Skip to content

Commit

Permalink
tests: Retry when image-builder is unavailble for some reason
Browse files Browse the repository at this point in the history
  • Loading branch information
utam0k authored and roboquat committed Aug 26, 2022
1 parent 21b1d3d commit 17c777f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/tests/components/image-builder/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (

"golang.org/x/sync/errgroup"
"golang.org/x/xerrors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"sigs.k8s.io/e2e-framework/pkg/envconf"
"sigs.k8s.io/e2e-framework/pkg/features"

Expand Down Expand Up @@ -75,6 +77,9 @@ func TestBaseImageBuild(t *testing.T) {
}

if err != nil {
if st, ok := status.FromError(err); ok && st.Code() == codes.Unavailable {
continue
}
t.Fatal(err)
}

Expand All @@ -84,7 +89,7 @@ func TestBaseImageBuild(t *testing.T) {
} else if msg.Status == imgapi.BuildStatus_done_failure {
t.Fatalf("image build failed: %s", msg.Message)
} else {
t.Logf("build output: %s", msg.Message)
t.Logf("build output: %s, %s", msg.Message, msg.Info)
}
}
if ref == "" {
Expand Down

0 comments on commit 17c777f

Please sign in to comment.