Skip to content

Commit

Permalink
modify test + fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Oren committed Mar 25, 2023
1 parent 985a719 commit 1004f34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/clients/key_flow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestKeyFlow_processConfig(t *testing.T) {
os.Setenv(ServiceAccountKeyPath, "test 2")
os.Setenv(PrivateKey, "test 3")
os.Setenv(ServiceAccountKey, "test 4")
os.Setenv(Environment, "dev")
os.Setenv(Environment, "qa")

kf := &KeyFlow{}
kf.processConfig()
Expand All @@ -31,7 +31,7 @@ func TestKeyFlow_processConfig(t *testing.T) {
ServiceAccountKeyPath: "test 2",
PrivateKey: []byte("test 3"),
ServiceAccountKey: []byte("test 4"),
Environment: env.Parse("dev"),
Environment: env.Parse("qa"),
}
assert.EqualValues(t, want, *kf.config)

Expand All @@ -54,7 +54,7 @@ func TestKeyFlow_processConfig(t *testing.T) {
{ServiceAccountKeyPath: "test 2"},
{PrivateKey: []byte("test 3")},
{ServiceAccountKey: []byte("test 4")},
{Environment: "dev"},
{Environment: "qa"},
}}},
}
for _, tt := range tests {
Expand Down
2 changes: 1 addition & 1 deletion pkg/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func Parse(env string) Environment {
return Dev
}
if strings.EqualFold(env, "qa") {
return Dev
return QA
}
return Production
}
Expand Down

0 comments on commit 1004f34

Please sign in to comment.