@@ -47,14 +47,14 @@ func GenerateV4(kbc *utils.TestContext) {
47
47
"--programmatic-validation" ,
48
48
"--make=false" ,
49
49
)
50
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
50
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to scaffolding mutating webhook" )
51
51
52
52
By ("implementing the mutating and validating webhooks" )
53
53
webhookFilePath := filepath .Join (
54
54
kbc .Dir , "internal/webhook" , kbc .Version ,
55
55
fmt .Sprintf ("%s_webhook.go" , strings .ToLower (kbc .Kind )))
56
56
err = utils .ImplementWebhooks (webhookFilePath , strings .ToLower (kbc .Kind ))
57
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
57
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to implement webhooks" )
58
58
59
59
scaffoldConversionWebhook (kbc )
60
60
@@ -95,14 +95,14 @@ func GenerateV4WithoutMetrics(kbc *utils.TestContext) {
95
95
"--programmatic-validation" ,
96
96
"--make=false" ,
97
97
)
98
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
98
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to scaffolding mutating webhook" )
99
99
100
100
By ("implementing the mutating and validating webhooks" )
101
101
webhookFilePath := filepath .Join (
102
102
kbc .Dir , "internal/webhook" , kbc .Version ,
103
103
fmt .Sprintf ("%s_webhook.go" , strings .ToLower (kbc .Kind )))
104
104
err = utils .ImplementWebhooks (webhookFilePath , strings .ToLower (kbc .Kind ))
105
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
105
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to implement webhooks" )
106
106
107
107
scaffoldConversionWebhook (kbc )
108
108
@@ -158,14 +158,14 @@ func GenerateV4WithNetworkPolicies(kbc *utils.TestContext) {
158
158
"--programmatic-validation" ,
159
159
"--make=false" ,
160
160
)
161
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
161
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to scaffolding mutating webhook" )
162
162
163
163
By ("implementing the mutating and validating webhooks" )
164
164
webhookFilePath := filepath .Join (
165
165
kbc .Dir , "internal/webhook" , kbc .Version ,
166
166
fmt .Sprintf ("%s_webhook.go" , strings .ToLower (kbc .Kind )))
167
167
err = utils .ImplementWebhooks (webhookFilePath , strings .ToLower (kbc .Kind ))
168
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
168
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to implement webhooks" )
169
169
170
170
scaffoldConversionWebhook (kbc )
171
171
@@ -222,7 +222,7 @@ func creatingAPI(kbc *utils.TestContext) {
222
222
"--controller" ,
223
223
"--make=false" ,
224
224
)
225
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
225
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to create API" )
226
226
227
227
By ("implementing the API" )
228
228
ExpectWithOffset (1 , pluginutil .InsertCode (
@@ -241,7 +241,7 @@ func initingTheProject(kbc *utils.TestContext) {
241
241
"--project-version" , "3" ,
242
242
"--domain" , kbc .Domain ,
243
243
)
244
- ExpectWithOffset ( 1 , err ).NotTo (HaveOccurred ())
244
+ Expect ( err ).NotTo (HaveOccurred (), "Failed to initialize project" )
245
245
}
246
246
247
247
const metricsTarget = `- path: manager_metrics_patch.yaml
0 commit comments