From a169cf768125cf3d46a0515b9e8283d99821d07a Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sat, 17 Sep 2022 12:34:11 +0200 Subject: [PATCH] Add unit test case for passing username --- pkg/config/config_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index b6ed098..967e864 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -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{