@@ -9,7 +9,6 @@ package kubernetes
9
9
10
10
import (
11
11
"context"
12
- "fmt"
13
12
"os"
14
13
"path/filepath"
15
14
"testing"
@@ -249,7 +248,7 @@ func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Pro
249
248
}
250
249
251
250
return false
252
- }, defaultWait , defaultTick )
251
+ }, defaultWait , defaultTick , " timed out waiting for GatewayClass %s to report Accepted=True condition" , gc . Name )
253
252
254
253
defer func () {
255
254
require .NoError (t , cli .Delete (ctx , gc ))
@@ -331,22 +330,21 @@ func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Pro
331
330
require .NoError (t , cli .Create (ctx , deploy ))
332
331
require .NoError (t , cli .Create (ctx , svc ))
333
332
334
- // Ensure the Gateway reports "Scheduled ".
333
+ // Ensure the Gateway reports "Accepted ".
335
334
require .Eventually (t , func () bool {
336
335
if err := cli .Get (ctx , utils .NamespacedName (gw ), gw ); err != nil {
337
336
return false
338
337
}
339
338
340
339
for _ , cond := range gw .Status .Conditions {
341
- fmt .Printf ("Condition: %v\n " , cond )
342
340
if cond .Type == string (gwapiv1 .GatewayConditionAccepted ) && cond .Status == metav1 .ConditionTrue {
343
341
return true
344
342
}
345
343
}
346
344
347
- // Scheduled =True condition not found.
345
+ t . Logf ( "Accepted =True condition not found in Gateway %s/%s conditions: %+v" , gw . Namespace , gw . Name , gw . Status . Conditions )
348
346
return false
349
- }, defaultWait , defaultTick )
347
+ }, defaultWait , defaultTick , " timed out waiting for Gateway %s to report Accepted=True condition" , utils . NamespacedName ( gw ) )
350
348
351
349
defer func () {
352
350
require .NoError (t , cli .Delete (ctx , gw ))
0 commit comments