Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmadhankumar committed Oct 20, 2023
1 parent 29060db commit a8d8b9a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/e2e/ignore_failing_api_services_flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestIgnoreFailingAPIServices(t *testing.T) {
env := BuildEnv(t)
logger := Logger{}
kapp := Kapp{t, env.Namespace, env.KappBinaryPath, logger}
kubectl := Kubectl{t, env.Namespace, l}

Check failure on line 19 in test/e2e/ignore_failing_api_services_flag_test.go

View workflow job for this annotation

GitHub Actions / lint

undefined: l (typecheck)

yaml1 := `
---
Expand Down Expand Up @@ -126,13 +127,20 @@ metadata:
})

logger.Section("deploy app that uses failing api service", func() {
out, err := kapp.RunWithOpts([]string{"deploy", "-f", "-", "-a", name3}, RunOpts{

out, err := kubectl.RunWithOpts([]string{"get", "apiservice"}, RunOpts{
AllowError: true})

fmt.Printf(" \n =========> Out: %+v", out)
fmt.Printf("\n ==========> err: %+v", err)

out, err = kapp.RunWithOpts([]string{"deploy", "-f", "-", "-a", name3}, RunOpts{
AllowError: true, IntoNs: true, StdinReader: strings.NewReader(yaml3)})

fmt.Printf(" \n =========> Out: %+v", out)
fmt.Printf("\n ==========> err: %+v", err)
fmt.Printf("\n ==========> err.Error(): %+s", err.Error())
require.Errorf(t, err, "Expected error when deploying with failing api service")
require.Errorf(t, err, "Expected error when deploying with failing api serviceeasouckweg")

require.Contains(t, err.Error(), "unable to retrieve the complete list of server APIs: samplekapptest.com/v1",
"Expected api retrieval error")
Expand Down

0 comments on commit a8d8b9a

Please sign in to comment.