Skip to content

Commit

Permalink
t.Error
Browse files Browse the repository at this point in the history
  • Loading branch information
npolshakova committed Jul 8, 2024
1 parent 394f72c commit 0737893
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
9 changes: 6 additions & 3 deletions test/kubernetes/e2e/tests/automtls_istio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func TestK8sGatewayIstioAutoMtls(t *testing.T) {
err := testInstallation.AddIstioctl(ctx)
if err != nil {
log.Printf("failed to install: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// We register the cleanup function _before_ we actually perform the installation.
Expand All @@ -50,15 +51,17 @@ func TestK8sGatewayIstioAutoMtls(t *testing.T) {
err = testInstallation.UninstallIstio()
if err != nil {
log.Printf("failed to uninstall: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}
})

// Install Istio before Gloo Gateway to make sure istiod is present before istio-proxy
err = testInstallation.InstallMinimalIstio(ctx)
if err != nil {
log.Printf("failed to install: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// Install Gloo Gateway
Expand Down
9 changes: 6 additions & 3 deletions test/kubernetes/e2e/tests/istio_edge_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func TestIstioEdgeApiGateway(t *testing.T) {
err := testInstallation.AddIstioctl(ctx)
if err != nil {
log.Printf("failed to add istioctl: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// We register the cleanup function _before_ we actually perform the installation.
Expand All @@ -53,15 +54,17 @@ func TestIstioEdgeApiGateway(t *testing.T) {
err = testInstallation.UninstallIstio()
if err != nil {
log.Printf("failed to uninstall: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}
})

// Install Istio before Gloo Gateway to make sure istiod is present before istio-proxy
err = testInstallation.InstallMinimalIstio(ctx)
if err != nil {
log.Printf("failed to install: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// Install Gloo Gateway with only Edge APIs enabled
Expand Down
9 changes: 6 additions & 3 deletions test/kubernetes/e2e/tests/istio_regression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func TestIstioRegression(t *testing.T) {
err := testInstallation.AddIstioctl(ctx)
if err != nil {
log.Printf("failed to add istioctl: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// We register the cleanup function _before_ we actually perform the installation.
Expand All @@ -53,15 +54,17 @@ func TestIstioRegression(t *testing.T) {
err = testInstallation.UninstallIstio()
if err != nil {
log.Printf("failed to uninstall: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}
})

// Install Istio before Gloo Gateway to make sure istiod is present before istio-proxy
err = testInstallation.InstallMinimalIstio(ctx)
if err != nil {
log.Printf("failed to install: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// Install Gloo Gateway with only Edge APIs enabled
Expand Down
9 changes: 6 additions & 3 deletions test/kubernetes/e2e/tests/revision_istio_edge_gw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func TestRevisionIstioRegression(t *testing.T) {
err := testInstallation.AddIstioctl(ctx)
if err != nil {
log.Printf("failed to add istioctl: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// We register the cleanup function _before_ we actually perform the installation.
Expand All @@ -53,15 +54,17 @@ func TestRevisionIstioRegression(t *testing.T) {
err = testInstallation.UninstallIstio()
if err != nil {
log.Printf("failed to uninstall: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}
})

// Install Istio before Gloo Gateway to make sure istiod is present before istio-proxy
err = testInstallation.InstallRevisionedIstio(ctx)
if err != nil {
log.Printf("failed to install: %v\n", err)
t.Fail()
// immediately stop if Istio installation fails
t.Error()
}

// Install Gloo Gateway with only Edge APIs enabled
Expand Down

0 comments on commit 0737893

Please sign in to comment.