Skip to content

Commit 54f00fd

Browse files
committed
Update probes for OpenFaaS CE
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 09d44a4 commit 54f00fd

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

pkg/controller/deployment_test.go

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,21 @@ func Test_newDeployment(t *testing.T) {
2222
ReadOnlyRootFilesystem: true,
2323
},
2424
}
25-
26-
factory := NewFunctionFactory(fake.NewSimpleClientset(),
27-
k8s.DeploymentConfig{
28-
HTTPProbe: true,
29-
SetNonRootUser: true,
30-
LivenessProbe: &k8s.ProbeConfig{
31-
PeriodSeconds: 1,
32-
TimeoutSeconds: 3,
33-
InitialDelaySeconds: 0,
34-
},
35-
ReadinessProbe: &k8s.ProbeConfig{
36-
PeriodSeconds: 1,
37-
TimeoutSeconds: 3,
38-
InitialDelaySeconds: 0,
39-
},
40-
})
25+
k8sConfig := k8s.DeploymentConfig{
26+
HTTPProbe: true,
27+
SetNonRootUser: true,
28+
LivenessProbe: &k8s.ProbeConfig{
29+
PeriodSeconds: 1,
30+
TimeoutSeconds: 3,
31+
InitialDelaySeconds: 0,
32+
},
33+
ReadinessProbe: &k8s.ProbeConfig{
34+
PeriodSeconds: 1,
35+
TimeoutSeconds: 3,
36+
InitialDelaySeconds: 0,
37+
},
38+
}
39+
factory := NewFunctionFactory(fake.NewSimpleClientset(), k8sConfig)
4140

4241
secrets := map[string]*corev1.Secret{}
4342

0 commit comments

Comments
 (0)