Skip to content

Commit

Permalink
Add different types of startup probes to E2E test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgencur committed Aug 12, 2024
1 parent 6554a7d commit 7bdb4d7
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions test/e2e/multicontainerprobing/multicontainer_readiness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,18 @@ func TestMultiContainerReadinessDifferentProbeTypes(t *testing.T) {
Ports: []corev1.ContainerPort{{
ContainerPort: 8080,
}},
}, { // Sidecar with TCPSocket readiness and liveness probes.
}, { // Sidecar with TCPSocket startup, readiness and liveness probes.
Image: pkgTest.ImagePath(names.Sidecars[0]),
Env: []corev1.EnvVar{
{Name: "PORT", Value: "8881"},
},
StartupProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
TCPSocket: &corev1.TCPSocketAction{
Port: intstr.FromInt32(8881),
},
},
},
ReadinessProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
TCPSocket: &corev1.TCPSocketAction{
Expand All @@ -190,11 +197,19 @@ func TestMultiContainerReadinessDifferentProbeTypes(t *testing.T) {
},
},
},
}, { // Sidecar with HTTPGet readiness and Exec liveness probes.
}, { // Sidecar with HTTPGet startup, HTTPGet readiness and Exec liveness probes.
Image: pkgTest.ImagePath(names.Sidecars[1]),
Env: []corev1.EnvVar{
{Name: "PORT", Value: "8882"},
},
StartupProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/healthz/readiness",
Port: intstr.FromInt32(8882),
},
},
},
ReadinessProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Expand All @@ -210,11 +225,18 @@ func TestMultiContainerReadinessDifferentProbeTypes(t *testing.T) {
},
},
},
}, { // Sidecar with GRPC readiness and liveness probes.
}, { // Sidecar with GRPC startup, readiness and liveness probes.
Image: pkgTest.ImagePath(names.Sidecars[2]),
Env: []corev1.EnvVar{
{Name: "PORT", Value: "8883"},
},
StartupProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
GRPC: &corev1.GRPCAction{
Port: 8883,
},
},
},
ReadinessProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
GRPC: &corev1.GRPCAction{
Expand Down

0 comments on commit 7bdb4d7

Please sign in to comment.