Skip to content

Commit

Permalink
fix: increase timeout for invalid annotation test (konflux-ci#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
psturc authored and siddardh committed Mar 4, 2024
1 parent dcfb55f commit b8a4b26
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,7 @@ var _ = framework.BuildSuiteDescribe("Build service E2E tests", Label("build", "
It("handles invalid request annotation", func() {

invalidAnnotation := "foo"
expectedInvalidAnnotationMessage := fmt.Sprintf("unexpected build request: %s", invalidAnnotation)

Expect(f.AsKubeAdmin.HasController.SetComponentAnnotation(componentName, controllers.BuildRequestAnnotationName, invalidAnnotation, testNamespace)).To(Succeed())

Expand Down Expand Up @@ -1078,11 +1079,11 @@ var _ = framework.BuildSuiteDescribe("Build service E2E tests", Label("build", "
if err != nil {
return err
}
if !strings.Contains(buildStatus.Message, fmt.Sprintf("unexpected build request: %s", invalidAnnotation)) {
return fmt.Errorf("build status message is not as expected, got %s", buildStatus.Message)
if !strings.Contains(buildStatus.Message, expectedInvalidAnnotationMessage) {
return fmt.Errorf("build status message is not as expected, got: %q, expected: %q", buildStatus.Message, expectedInvalidAnnotationMessage)
}
return nil
}, time.Minute*1, 2*time.Second).Should(Succeed(), "failed while checking build status message is correct after setting invalid annotations")
}, time.Minute*2, 2*time.Second).Should(Succeed(), "failed while checking build status message for component %q is correct after setting invalid annotations", componentName)
})
})
})
Expand Down

0 comments on commit b8a4b26

Please sign in to comment.