Skip to content

Commit

Permalink
Add unit test case for passing username
Browse files Browse the repository at this point in the history
  • Loading branch information
yannh committed Sep 17, 2022
1 parent ed203e7 commit a169cf7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ func TestFromFlags(t *testing.T) {
Output: "commands",
},
},
{
[]string{"-host", "redis", "-port", "1234", "-batchSize", "10", "-user", "test"},
Config{
Db: -1,
Host: "redis",
Port: 1234,
Filter: "*",
BatchSize: 10,
NWorkers: 10,
WithTTL: true,
Output: "resp",
Username: "test",
},
},
{
[]string{"-db", "1"},
Config{
Expand Down

0 comments on commit a169cf7

Please sign in to comment.