Skip to content

moemoe89/go-unit-test-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Build Status codecov Go Report Card

GO-UNIT-TEST-REDIS

Example Mock Unit Test for Redis in Golang

Directory structure

Your project directory structure should look like this

  + your_gopath/
  |
  +--+ src/github.com/moemoe89
  |  |
  |  +--+ go-unit-test-redis/
  |     |
  |     +--+ main.go
  |        + repository/
  |        |
  |        +--+ repository.go
  |           + repository_test.go
  |
  +--+ bin/
  |  |
  |  +-- ... executable file
  |
  +--+ pkg/
     |
     +-- ... all dependency_library required

Setup

$ mkdir -p src/github.com/moemoe89
$ cd src/github.com/moemoe89
$ git clone <url>
$ mv <cloned directory> go-unit-test-redis

How to Run Test

$ go test ./...

License

MIT

About

๐Ÿ“ˆ Mock Unit Test for Redis in Golang for my Medium story material

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages