Fixes the test for cronjob
This commit is contained in:
@@ -39,8 +39,8 @@ services:
|
|||||||
t.Errorf("Expected image to be alpine, got %s", cronJob.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Image)
|
t.Errorf("Expected image to be alpine, got %s", cronJob.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Image)
|
||||||
}
|
}
|
||||||
combinedCommand := strings.Join(cronJob.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Args, " ")
|
combinedCommand := strings.Join(cronJob.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Args, " ")
|
||||||
if combinedCommand != "echo hello" {
|
if combinedCommand != `sh -c "echo hello"` {
|
||||||
t.Errorf("Expected command to be sh -c echo hello, got %s", combinedCommand)
|
t.Errorf("Expected command to be sh -c \"echo hello\", got %s", combinedCommand)
|
||||||
}
|
}
|
||||||
if cronJob.Spec.Schedule != "*/1 * * * *" {
|
if cronJob.Spec.Schedule != "*/1 * * * *" {
|
||||||
t.Errorf("Expected schedule to be */1 * * * *, got %s", cronJob.Spec.Schedule)
|
t.Errorf("Expected schedule to be */1 * * * *, got %s", cronJob.Spec.Schedule)
|
||||||
|
|||||||
Reference in New Issue
Block a user