Skip to content

Commit 17c777f

Browse files
utam0kroboquat
authored andcommitted
tests: Retry when image-builder is unavailble for some reason
1 parent 21b1d3d commit 17c777f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/tests/components/image-builder/builder_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import (
1313

1414
"golang.org/x/sync/errgroup"
1515
"golang.org/x/xerrors"
16+
"google.golang.org/grpc/codes"
17+
"google.golang.org/grpc/status"
1618
"sigs.k8s.io/e2e-framework/pkg/envconf"
1719
"sigs.k8s.io/e2e-framework/pkg/features"
1820

@@ -75,6 +77,9 @@ func TestBaseImageBuild(t *testing.T) {
7577
}
7678

7779
if err != nil {
80+
if st, ok := status.FromError(err); ok && st.Code() == codes.Unavailable {
81+
continue
82+
}
7883
t.Fatal(err)
7984
}
8085

@@ -84,7 +89,7 @@ func TestBaseImageBuild(t *testing.T) {
8489
} else if msg.Status == imgapi.BuildStatus_done_failure {
8590
t.Fatalf("image build failed: %s", msg.Message)
8691
} else {
87-
t.Logf("build output: %s", msg.Message)
92+
t.Logf("build output: %s, %s", msg.Message, msg.Info)
8893
}
8994
}
9095
if ref == "" {

0 commit comments

Comments
 (0)