Skip to content

Commit

Permalink
Wait till GrpCurl job is ready (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkralik3 authored Oct 22, 2024
1 parent c6566e3 commit 94a501a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion pkg/app/grpcurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ func (a *grpcurl) Uninstall(t test.TestHelper) {

func (a *grpcurl) WaitReady(t test.TestHelper) {
t.T().Helper()
oc.WaitDeploymentRolloutComplete(t, a.ns, "grpcurl")
oc.WaitCondition(t, a.ns, "Jobs", "grpcurl", "complete")
}

// TODO: if you want to use different `grpcurl` command as
// grpcurl -insecure -authority grpc.example.com istio-ingressgateway.istio-system:443 list
// refactor Job to Deployments and run command via `oc exec`
const grpcCurlTemplate = `
apiVersion: batch/v1
kind: Job
Expand Down
Binary file removed pkg/tests/ossm-federation/__debug_bin3043052675
Binary file not shown.
4 changes: 2 additions & 2 deletions pkg/tests/tasks/traffic/ingress/grpc_https_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestExposeGrpcWithHttpsGateway(t *testing.T) {
oc.ApplyString(t, meshNamespace, grpcurlTLSGatewayHTTPS)

t.LogStep("Install grpcurl image")
app.Install(t, app.GrpCurl(ns.Default))
app.InstallAndWaitReady(t, app.GrpCurl(ns.Default))

retry.UntilSuccessWithOptions(t, retry.Options().MaxAttempts(20), func(t test.TestHelper) {
oc.LogsFromPods(t,
Expand Down Expand Up @@ -132,7 +132,7 @@ func TestExposeGrpcWitPassthroughGateway(t *testing.T) {
oc.ApplyString(t, ns.EchoGrpc, grpcurlPassthroughGatewayHTTPS)

t.LogStep("Install grpcurl image")
app.Install(t, app.GrpCurl(ns.Default))
app.InstallAndWaitReady(t, app.GrpCurl(ns.Default))
retry.UntilSuccessWithOptions(t, retry.Options().MaxAttempts(20), func(t test.TestHelper) {
oc.LogsFromPods(t,
ns.Default,
Expand Down

0 comments on commit 94a501a

Please sign in to comment.