Pure Go Redis server for Go unittests

Miniredis

Pure Go Redis test server, used in Go unittests.

Sometimes you want to test code which uses Redis, without making it a full-blown integration test. Miniredis implements (parts of) the Redis server, to be used in unittests. It enables a simple, cheap, in-memory, Redis replacement, with a real TCP interface. Think of it as the Redis version of net/http/httptest.

It saves you from using mock code, and since the redis server lives in the test process you can query for values directly, without going through the server stack.

There are no dependencies on external binaries, so you can easily integrate it in automated build processes.

Be sure to import v2:

import "github.com/alicebob/miniredis/v2"

Commands

Implemented commands:

  • Connection (complete)
    • AUTH -- see RequireAuth()
    • ECHO
    • HELLO -- see RequireUserAuth()
    • PING
    • SELECT
    • SWAPDB
    • QUIT
  • Key
    • DEL
    • EXISTS
    • EXPIRE
    • EXPIREAT
    • KEYS
    • MOVE
    • PERSIST
    • PEXPIRE
    • PEXPIREAT
    • PTTL
    • RENAME
    • RENAMENX
    • RANDOMKEY -- see m.Seed(...)
    • SCAN
    • TOUCH
    • TTL
    • TYPE
    • UNLINK
  • Transactions (complete)
    • DISCARD
    • EXEC
    • MULTI
    • UNWATCH
    • WATCH
  • Server
    • DBSIZE
    • FLUSHALL
    • FLUSHDB
    • TIME -- returns time.Now() or value set by SetTime()
  • String keys (complete)
    • APPEND
    • BITCOUNT
    • BITOP
    • BITPOS
    • DECR
    • DECRBY
    • GET
    • GETBIT
    • GETRANGE
    • GETSET
    • INCR
    • INCRBY
    • INCRBYFLOAT
    • MGET
    • MSET
    • MSETNX
    • PSETEX
    • SET
    • SETBIT
    • SETEX
    • SETNX
    • SETRANGE
    • STRLEN
  • Hash keys (complete)
    • HDEL
    • HEXISTS
    • HGET
    • HGETALL
    • HINCRBY
    • HINCRBYFLOAT
    • HKEYS
    • HLEN
    • HMGET
    • HMSET
    • HSET
    • HSETNX
    • HSTRLEN
    • HVALS
    • HSCAN
  • List keys (complete)
    • BLPOP
    • BRPOP
    • BRPOPLPUSH
    • LINDEX
    • LINSERT
    • LLEN
    • LPOP
    • LPUSH
    • LPUSHX
    • LRANGE
    • LREM
    • LSET
    • LTRIM
    • RPOP
    • RPOPLPUSH
    • RPUSH
    • RPUSHX
  • Pub/Sub (complete)
    • PSUBSCRIBE
    • PUBLISH
    • PUBSUB
    • PUNSUBSCRIBE
    • SUBSCRIBE
    • UNSUBSCRIBE
  • Set keys (complete)
    • SADD
    • SCARD
    • SDIFF
    • SDIFFSTORE
    • SINTER
    • SINTERSTORE
    • SISMEMBER
    • SMEMBERS
    • SMOVE
    • SPOP -- see m.Seed(...)
    • SRANDMEMBER -- see m.Seed(...)
    • SREM
    • SUNION
    • SUNIONSTORE
    • SSCAN
  • Sorted Set keys (complete)
    • ZADD
    • ZCARD
    • ZCOUNT
    • ZINCRBY
    • ZINTERSTORE
    • ZLEXCOUNT
    • ZPOPMIN
    • ZPOPMAX
    • ZRANGE
    • ZRANGEBYLEX
    • ZRANGEBYSCORE
    • ZRANK
    • ZREM
    • ZREMRANGEBYLEX
    • ZREMRANGEBYRANK
    • ZREMRANGEBYSCORE
    • ZREVRANGE
    • ZREVRANGEBYLEX
    • ZREVRANGEBYSCORE
    • ZREVRANK
    • ZSCORE
    • ZUNIONSTORE
    • ZSCAN
  • Stream keys
    • XACK
    • XADD
    • XDEL
    • XGROUP CREATE
    • XINFO STREAM -- partly
    • XLEN
    • XRANGE
    • XREAD -- partly
    • XREADGROUP -- partly
    • XREVRANGE
  • Scripting
    • EVAL
    • EVALSHA
    • SCRIPT LOAD
    • SCRIPT EXISTS
    • SCRIPT FLUSH
  • GEO
    • GEOADD
    • GEODIST
    • GEOHASH
    • GEOPOS
    • GEORADIUS
    • GEORADIUS_RO
    • GEORADIUSBYMEMBER
    • GEORADIUSBYMEMBER_RO
  • Server
    • COMMAND -- partly
  • Cluster
    • CLUSTER SLOTS
    • CLUSTER KEYSLOT
    • CLUSTER NODES

TTLs, key expiration, and time

Since miniredis is intended to be used in unittests TTLs don't decrease automatically. You can use TTL() to get the TTL (as a time.Duration) of a key. It will return 0 when no TTL is set.

m.FastForward(d) can be used to decrement all TTLs. All TTLs which become <= 0 will be removed.

EXPIREAT and PEXPIREAT values will be converted to a duration. For that you can either set m.SetTime(t) to use that time as the base for the (P)EXPIREAT conversion, or don't call SetTime(), in which case time.Now() will be used.

SetTime() also sets the value returned by TIME, which defaults to time.Now(). It is not updated by FastForward, only by SetTime.

Randomness and Seed()

Miniredis will use math/rand's global RNG for randomness unless a seed is provided by calling m.Seed(...). If a seed is provided, then miniredis will use its own RNG based on that seed.

Commands which use randomness are: RANDOMKEY, SPOP, and SRANDMEMBER.

Example

import (
    ...
    "github.com/alicebob/miniredis/v2"
    ...
)

func TestSomething(t *testing.T) {
	s, err := miniredis.Run()
	if err != nil {
		panic(err)
	}
	defer s.Close()

	// Optionally set some keys your code expects:
	s.Set("foo", "bar")
	s.HSet("some", "other", "key")

	// Run your code and see if it behaves.
	// An example using the redigo library from "github.com/gomodule/redigo/redis":
	c, err := redis.Dial("tcp", s.Addr())
	_, err = c.Do("SET", "foo", "bar")

	// Optionally check values in redis...
	if got, err := s.Get("foo"); err != nil || got != "bar" {
		t.Error("'foo' has the wrong value")
	}
	// ... or use a helper for that:
	s.CheckGet(t, "foo", "bar")

	// TTL and expiration:
	s.Set("foo", "bar")
	s.SetTTL("foo", 10*time.Second)
	s.FastForward(11 * time.Second)
	if s.Exists("foo") {
		t.Fatal("'foo' should not have existed anymore")
	}
}

Not supported

Commands which will probably not be implemented:

  • CLUSTER (all)
    • CLUSTER *
    • READONLY
    • READWRITE
  • HyperLogLog (all) -- unless someone needs these
    • PFADD
    • PFCOUNT
    • PFMERGE
  • Key
    • DUMP
    • MIGRATE
    • OBJECT
    • RESTORE
    • WAIT
  • Scripting
    • SCRIPT DEBUG
    • SCRIPT KILL
  • Server
    • BGSAVE
    • BGWRITEAOF
    • CLIENT *
    • CONFIG *
    • DEBUG *
    • INFO
    • LASTSAVE
    • MONITOR
    • ROLE
    • SAVE
    • SHUTDOWN
    • SLAVEOF
    • SLOWLOG
    • SYNC

&c.

Integration tests are run against Redis 6.0.10. The ./integration subdir compares miniredis against a real redis instance.

The Redis 6 RESP3 protocol is supported. If there are problems, please open an issue.

If you want to test Redis Sentinel have a look at minisentinel.

A changelog is kept at CHANGELOG.md.

Build Status Go Reference

Comments
  • Will timeouts be considered to adding to the repo?

    Will timeouts be considered to adding to the repo?

    I found that timeout are not implemented, is there any plan to implement it? And is there any technical challenge in the implementation? Do you accept the contribution from outside? Thank you!

  • v2.5.0 tag is gone

    v2.5.0 tag is gone

    Hi @alicebob -- I have encountered an error in a go library which requires v2.5.0 of this package. I am guessing that the tag was removed recently. Can we verify and/or re-add this tag?

  • Simulate server unavailable?

    Simulate server unavailable?

    I have a health check that pings redis to make sure it's alive. How do I configure or mock miniredis to pretend that is unavailable/unresponsive? Also specifying a timeout on the request?

  • Support for new cluster and streams commands.

    Support for new cluster and streams commands.

    • COMMAND (partly, only full command list);
    • CLUSTER SLOTS. For go-redis/redis cluster connection;
    • XGROUP CREATE;
    • XINFO STREAM (partly, only stream length);
    • XREADGROUP (partly, BLOCK and NOACK arguments not processed);
    • XACK;
    • XDEL.
  • ZRANGEBYLEX: Fix min resulting in empty set returning full set instead

    ZRANGEBYLEX: Fix min resulting in empty set returning full set instead

    If ZRANGEBYLEN was used with a Min that would result in an empty set, the break condition would never trigger so the full set would get returned instead.

    Fixes #99

  • Add PFADD, PFCOUNT, PFMERGE commands

    Add PFADD, PFCOUNT, PFMERGE commands

    Hi there! We're using your awesome miniredis library for redis-related unit tests in the company I'm working at. Once we started using HLL-related commands of redis, we also definitely wanted to cover the corresponding logic with unit tests but unfortunately found out that HLL-related commands are not supported in miniredis.

    I'm adding HLL-related commands to miniredis with this PR using one quite popular implementation of HLL in golang https://github.com/axiomhq/hyperloglog but not reimplementing the actual C++ implementation of HLL https://download.redis.io/redis-stable/src/hyperloglog.c. Why I did this choice - in fact the miniredis is mainly used for testing purposes and hence it's not necessary to have the 100% compatibility of all the internal details, it's enough to have the compatibility of the protocol and the functionality. Basically the implementation of HLL used in this PR behaves almost the same as redis' variant of HLL. One potential difference I could think of is that the set cardinality estimation accuracy could slightly differ on big sets (containing over 1M of elements), but anyway I'm not sure that somebody plans to have sets of over 1M cardinality in unit tests. Please let me know what you think about it.

    Also one arguable question - not sure if it's OK for you that I'm adding a new dependency. I could have added the implementation of HLL explicitly as it's been done for geohash library.

    Thanks, please let's discuss all the things. If you have any concern about what might be improved, please let me know.

  • Allow custom command implementations

    Allow custom command implementations

    My specific scenario was the need to implement INFO and it seemed like this would be relatively easy to do if the underlying Server.Register was accessible.

    In my private fork, I ended up exposing the Server like here. If exposing the full Server object is too much, we could just proxy the Register() method.

    Thoughts?

  • Can't store values with '\n' character

    Can't store values with '\n' character

    There is an issue where you can't store any values that contain a \n character. This is causing some problems for me as I'm trying to marshal proto into redis (which separates values with a \n char). It works on a live redis server but not in miniredis. Here's a simple test I just wrote up:

    func TestNewLine(t *testing.T) {
    	redisServer := setup()
    	defer teardown(redisServer)
    
    	// Query to check that it exists in DB
    	redisClient := redis.NewClient(&redis.Options{
    		Addr:     redisServer.Addr(),
    		Password: "", // no password set
    		DB:       0,  // use default DB
    	})
    
    	err := redisClient.ZAdd("effects", redis.Z{
    		Score:  float64(0),
    		Member: "value",
    	}).Err()
    	if err != nil {
    		t.Errorf("got unexpected error: %v", err)
    	}
    
    	err = redisClient.ZAdd("effects", redis.Z{
    		Score:  float64(0),
    		Member: "value2\n",
    	}).Err()
    	if err != nil {
    		t.Errorf("got unexpected error: %v", err)
    	}
    
    	keys, _ := redisClient.ZScan("effects", 0, "*", 0).Val()
    	fmt.Println(keys)
    	if len(keys) != 4 {
    		t.Errorf("got %v, want %v", len(keys), 4)
    	}
    }
    

    Output:

    [value 0]
    --- FAIL: TestNewLine (0.00s)
        /Users/zachary/Documents/code/github.com/terrariumai/simulation/pkg/datacom/redis_test.go:776: got 2, want 4
    FAIL
    FAIL	github.com/terrariumai/simulation/pkg/datacom	0.033s
    Error: Tests failed.
    

    Looking at the print out, only the first ZAdd is working. Whats more interesting is that the second doesn't error out. The value is just not getting added.

  • Add GEOADD and GEORADIUS commands

    Add GEOADD and GEORADIUS commands

    This PR adds basic support for redis Geo commands GEOADD and GEORADIUS. I've also added a very simple test.

    Credits: Thank you @alicebob for your help :-)

  • ERR unknown command 'brpop'

    ERR unknown command 'brpop'

    This issue is rather a question. I see commands like brpop are not implemented. Can we have a discussion about this? Why are such commands not implemented? One of my pet projects makes use of brpop. Now I added miniredis to test my storage implementations. It would be supreme to have support for these commands. Cheers.

  • Intermittent panic when go test with -coverpkg

    Intermittent panic when go test with -coverpkg

    Miniredis intermittent panic when I run go test with -coverpkg

    - GOOS=linux GOARCH=amd64 go test ./... -coverprofile=./cover.out -coverpkg=./...
    
    
    {"level":"info","time":"2022-08-12T11:05:26Z","message":"No redis set on env, start mini redis."}
    
    panic: runtime error: invalid memory address or nil pointer dereference
    
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x956e9c]
    
    
    
    goroutine 1 [running]:
    
    github.com/alicebob/miniredis/v2/server.(*Server).Addr(0x0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/server/server.go:122 +0x3c
    
    github.com/alicebob/miniredis/v2.(*Miniredis).Addr(0xc0005142a0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/miniredis.go:290 +0x85
    
    github.tools.sap/aeolia/bff/proxy/model.GetRedisCfg()
    
    	/workspace/proxy/model/redis.go:76 +0xb4
    
    github.tools.sap/aeolia/bff/proxy/model.SetupDefaultRedis()
    
    	/workspace/proxy/model/redis.go:47 +0x50
    
    github.tools.sap/aeolia/bff/proxy/model.init.0()
    
    	/workspace/proxy/model/redis.go:15 +0x25
    
    FAIL	github.tools.sap/aeolia/bff/proxy/btp_auditlog	0.024s
    
    ?   	github.tools.sap/aeolia/bff/proxy/cmd	[no test files]
    
    {"level":"info","time":"2022-08-12T11:05:26Z","message":"No redis set on env, start mini redis."}
    
    panic: runtime error: invalid memory address or nil pointer dereference
    
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x9622fc]
    
    
    
    goroutine 1 [running]:
    
    github.com/alicebob/miniredis/v2/server.(*Server).Addr(0x0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/server/server.go:122 +0x3c
    
    github.com/alicebob/miniredis/v2.(*Miniredis).Addr(0xc0001988a0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/miniredis.go:290 +0x85
    
    github.tools.sap/aeolia/bff/proxy/model.GetRedisCfg()
    
    	/workspace/proxy/model/redis.go:76 +0xb4
    
    github.tools.sap/aeolia/bff/proxy/model.SetupDefaultRedis()
    
    	/workspace/proxy/model/redis.go:47 +0x50
    
    github.tools.sap/aeolia/bff/proxy/model.init.0()
    
    	/workspace/proxy/model/redis.go:15 +0x25
    
    FAIL	github.tools.sap/aeolia/bff/proxy/consts	0.028s
    
    {"level":"info","time":"2022-08-12T11:05:26Z","message":"No redis set on env, start mini redis."}
    
    panic: runtime error: invalid memory address or nil pointer dereference
    
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x9f1efc]
    
    
    
    goroutine 1 [running]:
    
    github.com/alicebob/miniredis/v2/server.(*Server).Addr(0x0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/server/server.go:122 +0x3c
    
    github.com/alicebob/miniredis/v2.(*Miniredis).Addr(0xc0000ac3c0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/miniredis.go:290 +0x85
    
    github.tools.sap/aeolia/bff/proxy/model.GetRedisCfg()
    
    	/workspace/proxy/model/redis.go:76 +0xb4
    
    github.tools.sap/aeolia/bff/proxy/model.SetupDefaultRedis()
    
    	/workspace/proxy/model/redis.go:47 +0x50
    
    github.tools.sap/aeolia/bff/proxy/model.init.0()
    
    	/workspace/proxy/model/redis.go:15 +0x25
    
    FAIL	github.tools.sap/aeolia/bff/proxy/errors	0.025s
    
    ok  	github.tools.sap/aeolia/bff/proxy/infra	0.270s	coverage: 5.2% of statements in ./...
    
    {"level":"info","time":"2022-08-12T11:05:26Z","message":"No redis set on env, start mini redis."}
    
    panic: runtime error: invalid memory address or nil pointer dereference
    
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x91ebdc]
    
    
    
    goroutine 1 [running]:
    
    github.com/alicebob/miniredis/v2/server.(*Server).Addr(0x0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/server/server.go:122 +0x3c
    
    github.com/alicebob/miniredis/v2.(*Miniredis).Addr(0xc0000ac060?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/miniredis.go:290 +0x85
    
    github.tools.sap/aeolia/bff/proxy/model.GetRedisCfg()
    
    	/workspace/proxy/model/redis.go:76 +0xb4
    
    github.tools.sap/aeolia/bff/proxy/model.SetupDefaultRedis()
    
    	/workspace/proxy/model/redis.go:47 +0x50
    
    github.tools.sap/aeolia/bff/proxy/model.init.0()
    
    	/workspace/proxy/model/redis.go:15 +0x25
    
    FAIL	github.tools.sap/aeolia/bff/proxy/logger	0.030s
    
    ok  	github.tools.sap/aeolia/bff/proxy/middlewares	0.052s	coverage: 18.4% of statements in ./...
    
    ok  	github.tools.sap/aeolia/bff/proxy/model	0.051s	coverage: 4.6% of statements in ./...
    
    {"level":"info","time":"2022-08-12T11:05:26Z","message":"No redis set on env, start mini redis."}
    
    panic: runtime error: invalid memory address or nil pointer dereference
    
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x1289b9c]
    
    
    
    goroutine 1 [running]:
    
    github.com/alicebob/miniredis/v2/server.(*Server).Addr(0x0?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/server/server.go:122 +0x3c
    
    github.com/alicebob/miniredis/v2.(*Miniredis).Addr(0xc0001bd260?)
    
    	/go/pkg/mod/github.com/alicebob/miniredis/[email protected]/miniredis.go:290 +0x85
    
    github.tools.sap/aeolia/bff/proxy/model.GetRedisCfg()
    
    	/workspace/proxy/model/redis.go:76 +0xb4
    
    github.tools.sap/aeolia/bff/proxy/model.SetupDefaultRedis()
    
    	/workspace/proxy/model/redis.go:47 +0x50
    
    github.tools.sap/aeolia/bff/proxy/model.init.0()
    
    	/workspace/proxy/model/redis.go:15 +0x25
    
    FAIL	github.tools.sap/aeolia/bff/proxy/routers	0.028s
    
    ok  	github.tools.sap/aeolia/bff/proxy/services	0.030s	coverage: 3.0% of statements in ./...
    
    ok  	github.tools.sap/aeolia/bff/proxy/utils	0.048s	coverage: 8.7% of statements in ./...
    
    FAIL
    
  • Stream XREAD last ID '$' has incorrect behavior when blocking forever

    Stream XREAD last ID '$' has incorrect behavior when blocking forever

    Hi, I found an issue using the XREAD command when passing in $ as the ID. I'm using version v2.20.0.

    I think this is because in the MiniRedis server it's performing the xread callback periodically and each time getting the last ID if the original XREAD command contained $. Instead I think it should be getting the last ID in the initial command and then re-using that instead of $ for future xread polls.

    For example this will never return anything:

    go func() {
      result, err := client.XRead(ctx, &redis.XReadArgs{
        Streams: []string{"my-stream", "$"},
        Block:   0,
      }).Result()
    }()
    
    _, err = client.XAdd(ctx, &redis.XAddArgs{
      Stream: "my-stream",
      Values: map[string]interface{"test": "data"}
    }).Result()
    

    Because when we add the new item to the stream, in MiniRedis it's then using the newest item ID in the next poll to xread.

    Easiest fix looks like in cmd_stream.go it should fetch IDs before the blocking call:

    	s, _ := m.db(getCtx(c).selectedDB).streamKeys[opts.streams[0]]
    	opts.ids = []string{s.lastID()}
    	blocking(...)
    

    Please correct me if you think this behavior is wrong 😄

  • Problem about overflow inspection of INCRBY/DECRBY

    Problem about overflow inspection of INCRBY/DECRBY

    Miniredis throws out no error of overflowing when the value becomes greater than math.MaxInt64 after INCRBY or DECRBY (also INCR or DECR). Instead it returns a negative number which was exactly the overflowed value. As a comparison, the real redis instance returns ERR increment or decrement would overflow which thrown out by overflow detection and nothing will be changed.

    I found the cause of it and some potential issues as well. I can make a patch to it if it is indeed an unexpected behavior of miniredis.

    The following code reproduces the problem.

    package main
    
    import(
        "log"
        "math"
        "github.com/alicebob/miniredis/v2"
        "github.com/gomodule/resign/redis"
    )
    
    func main() {
        server, _ := miniredis.Run()
        minirds, _ := redis.Dial("tcp", server.Addr())
        defer miniredis.Close()
        realrds, _ := redis.Dial("tcp", "127.0.0.1:6379") // redis instance
        defer realrds.Close()
        overflowTest(minirds)
        overflowTest(realrds)
    }
    
    func overflowTest(r redis.Conn) {
        _, _ = r.Do("SET", "number", 100)
        rsp, err := redis.Int64(r.Do("INCRBY", "number", math.MaxInt64)
        if err != nil {
            log.Printf("got an error when exec INCRBY, err=%v", err)
        }
        log.Printf("got=%d", rsp)
    }
    
A tool that integrates SQL, HTTP,interface,Redis mock

Mockit 目标:将mock变得简单,让代码维护变得容易 分支介绍 main 主分支,覆盖了单元测试 light 轻分支,去除了单元测试,简化了依赖项,方便其他团队使用 常见Mock难点 不同中间件,mock库设计模式不一致,学习代价高,差异化明显 mock方案强依赖服务端,无法灵活解耦 单元测试

Sep 22, 2022
A go server which will respond with data to mock a server!

Mocker A go program which will respond with data to mock a server; mainly useful while developing a frontend application, whose backend is not running

Jan 5, 2023
Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.
Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.

Fortio Fortio (Φορτίο) started as, and is, Istio's load testing tool and now graduated to be its own project. Fortio is also used by, among others, Me

Jan 2, 2023
Quick and Easy server testing/validation
Quick and Easy server testing/validation

Goss - Quick and Easy server validation Goss in 45 seconds Note: For an even faster way of doing this, see: autoadd Note: For testing docker container

Oct 7, 2022
Create your own mock server with just a JSON file!

Gmocker Run a blazing fast mock server in just seconds! ?? All you need is to make a json file that contains path and response mapping. See an example

Dec 21, 2022
Create your own blazing fast mock server with just a JSON file!

Gmocker Run a blazing fast mock server in just seconds! ?? All you need is to make a json file that contains path and response mapping. See an example

Dec 21, 2022
Dec 8, 2022
A simple and expressive HTTP server mocking library for end-to-end tests in Go.

mockhttp A simple and expressive HTTP server mocking library for end-to-end tests in Go. Installation go get -d github.com/americanas-go/mockhttp Exa

Dec 19, 2021
Http test server written in Golang.

Dummy Server Http test server written in Golang. Can get any request method and log headers, body, path and remote address. Useful if you need to know

Oct 31, 2021
Just Dance Unlimited mock-up server written on Golang and uses a popular Gin framework for Go.

BDCS Just Dance Unlimited mock-up server written on Golang and uses a popular Gin framework for Go. Features Security Authorization works using UbiSer

Nov 10, 2021
mock server to aid testing the jaguar-java client API

stripe-mock stripe-mock is a mock HTTP server that responds like the real Stripe API. It can be used instead of Stripe's test mode to make test suites

Dec 24, 2021
A simple mock server configurable via JSON, built using GoLang.
A simple mock server configurable via JSON, built using GoLang.

GoMock Server A simple mock server configurable via JSON, built using GoLang. How To A file name endpoint.json must be placed in the context root, wit

Nov 19, 2022
Golang Server Helpers

go-server-helpers Package Changes NOTE: This package is a work in progress and subject to change. Before v1.0.0 will use minor version tags to mark if

Mar 8, 2022
Client tool for testing HTTP server timeouts

HTTP timeout test client While testing Go HTTP server timeouts I wrote this little tool to help me test. It allows for slowing down header write and b

Sep 21, 2022
Mockserver - Super slim & blazing fast mock server to replace the Java/NPM counterpart mockserver

Gmocker Run a blazing fast mock server in just seconds! ?? All you need is to ma

Jan 30, 2022
Grpcmock - Mock grpc server with golang

grpcmock Mock gRPC server. Inspired by Prism. Add example responses to your prot

May 8, 2022
Redis-shake is a tool for synchronizing data between two redis databases. Redis-shake是一个用于在两个redis之间同步数据的工具,满足用户非常灵活的同步、迁移需求。
Redis-shake is a tool for synchronizing data between two redis databases. Redis-shake是一个用于在两个redis之间同步数据的工具,满足用户非常灵活的同步、迁移需求。

RedisShake is mainly used to synchronize data from one redis to another. Thanks to the Douyu's WSD team for the support. 中文文档 English tutorial 中文使用文档

Dec 29, 2022
:tophat: Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support
:tophat: Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support

Web server with built-in support for QUIC, HTTP/2, Lua, Markdown, Pongo2, HyperApp, Amber, Sass(SCSS), GCSS, JSX, BoltDB (built-in, stores the databas

Jan 1, 2023
GoBigdis is a persistent database that implements the Redis server protocol. Any Redis client can interface with it and start to use it right away.

GoBigdis GoBigdis is a persistent database that implements the Redis server protocol. Any Redis client can interface with it and start to use it right

Apr 27, 2022
Golang-redis-webserver - Web server using redis

Web Server using Redis Api REST Database SQLITE3 Cache Redis # Creating record s

Jun 19, 2022