Split probe env var default to separate test
@@ -41,10 +41,6 @@ func TestRead_EmptyTimeoutConfig(t *testing.T) {
t.Log("WriteTimeout incorrect")
t.Fail()
}
- if !config.EnableFunctionReadinessProbe {
- t.Log("EnableFunctionReadinressProbe incorrect")
- t.Fail()
- }
}
func TestRead_ReadAndWriteTimeoutConfig(t *testing.T) {
@@ -65,6 +61,17 @@ func TestRead_ReadAndWriteTimeoutConfig(t *testing.T) {
}
}
+func TestRead_EmptyProbeConfig(t *testing.T) {
+ defaults := NewEnvBucket()
+ readConfig := types.ReadConfig{}
+ config := readConfig.Read(defaults)
+
+ if !config.EnableFunctionReadinessProbe {
+ t.Log("EnableFunctionReadinressProbe incorrect")
+ t.Fail()
+ }
+}
+
func TestRead_EnableFunctionReadinessProbeConfig(t *testing.T) {
defaults := NewEnvBucket()
defaults.Setenv("enable_function_readiness_probe", "false")
