Skip to content

Commit 2342792

Browse files
committed
test: Add test for SLOW_MODE
1 parent 2b913fd commit 2342792

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

config/config_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ func TestInitialize(t *testing.T) {
1010
_ = os.Setenv(EnvAutoScalingGroupNames, "asg-a,asg-b,asg-c")
1111
_ = os.Setenv(EnvIgnoreDaemonSets, "false")
1212
_ = os.Setenv(EnvDeleteLocalData, "false")
13+
_ = os.Setenv(EnvSlowMode, "true")
1314
defer os.Clearenv()
1415
_ = Initialize()
1516
config := Get()
1617
if len(config.AutoScalingGroupNames) != 3 {
1718
t.Error()
1819
}
1920
if config.IgnoreDaemonSets {
20-
t.Error()
21+
t.Error("IgnoreDaemonSets should be false")
2122
}
2223
if config.DeleteEmptyDirData {
23-
t.Error()
24+
t.Error("DeleteEmptyDirData should be false")
25+
}
26+
if !config.SlowMode {
27+
t.Error("SlowMode should be true")
2428
}
2529
}
2630

@@ -38,6 +42,9 @@ func TestInitialize_withDefaultNonRequiredValues(t *testing.T) {
3842
if !config.DeleteEmptyDirData {
3943
t.Error("should've defaulted to deleting local data")
4044
}
45+
if config.SlowMode {
46+
t.Error("SlowMode should be false")
47+
}
4148
}
4249

4350
func TestInitialize_withMissingRequiredValues(t *testing.T) {

0 commit comments

Comments
 (0)