@@ -53,11 +53,9 @@ var _ = Describe("yatai-image-builder", Ordered, func() {
53
53
Context ("BentoRequest Operator" , func () {
54
54
It ("Should run successfully" , func () {
55
55
By ("Creating a BentoRequest CR" )
56
- EventuallyWithOffset (1 , func () error {
57
- cmd := exec .Command ("kubectl" , "apply" , "-f" , "tests/e2e/example.yaml" )
58
- _ , err := utils .Run (cmd )
59
- return err
60
- }, time .Minute , time .Second ).Should (Succeed ())
56
+ cmd := exec .Command ("kubectl" , "apply" , "-f" , "tests/e2e/example.yaml" )
57
+ out , err := utils .Run (cmd )
58
+ Expect (err ).To (BeNil (), "Failed to create BentoRequest CR: %s" , string (out ))
61
59
62
60
By ("Sleeping for 5 seconds" )
63
61
time .Sleep (5 * time .Second )
@@ -94,25 +92,18 @@ var _ = Describe("yatai-image-builder", Ordered, func() {
94
92
time .Sleep (5 * time .Second )
95
93
96
94
By ("Checking the generated Bento CR" )
97
- EventuallyWithOffset (1 , func () error {
98
- ctx := context .Background ()
95
+ ctx := context .Background ()
99
96
100
- logrus .Infof ("Getting BentoRequest CR %s" , "test-bento" )
101
- bentoRequest , err := bentorequestcli .BentoRequests ("yatai" ).Get (ctx , "test-bento" , metav1.GetOptions {})
102
- if err != nil {
103
- return err
104
- }
97
+ logrus .Infof ("Getting BentoRequest CR %s" , "test-bento" )
98
+ bentoRequest , err := bentorequestcli .BentoRequests ("yatai" ).Get (ctx , "test-bento" , metav1.GetOptions {})
99
+ Expect (err ).To (BeNil (), "failed to get BentoRequest CR" )
105
100
106
- logrus .Infof ("Getting Bento CR %s" , "test-bento" )
107
- bento , err := bentorequestcli .Bentoes ("yatai" ).Get (ctx , "test-bento" , metav1.GetOptions {})
108
- if err != nil {
109
- return err
110
- }
101
+ logrus .Infof ("Getting Bento CR %s" , "test-bento" )
102
+ bento , err := bentorequestcli .Bentoes ("yatai" ).Get (ctx , "test-bento" , metav1.GetOptions {})
103
+ Expect (err ).To (BeNil (), "failed to get Bento CR" )
111
104
112
- Expect (bentoRequest .Spec .BentoTag ).To (Equal (bento .Spec .Tag ), "BentoRequest and Bento tag should match" )
113
- Expect (bento .Spec .Image ).To (Not (BeEmpty ()), "Bento CR image should not be empty" )
114
- return nil
115
- }).Should (Succeed ())
105
+ Expect (bentoRequest .Spec .BentoTag ).To (Equal (bento .Spec .Tag ), "BentoRequest and Bento tag should match" )
106
+ Expect (bento .Spec .Image ).To (Not (BeEmpty ()), "Bento CR image should not be empty" )
116
107
})
117
108
})
118
109
})
0 commit comments