Skip to content

Commit bf30a8f

Browse files
committed
print-api7-ingress-system-logs
1 parent 4cd3db9 commit bf30a8f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ gofmt: ## Apply go fmt
264264
@go fmt ./...
265265
.PHONY: gofmt
266266

267+
print-api7-ingress-system-logs:
268+
@kubectl get pods --all-namespaces
269+
@kubectl get pods -o=name -n api7-ingress-system | xargs -I{} bash -c "echo ================= {} ==================== && kubectl logs --all-containers -n api7-ingress-system {} && echo ================= {} ===================="
270+
267271
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
268272
# $1 - target path with name of binary
269273
# $2 - package url which can be installed

test/e2e/scaffold/scaffold.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ func (s *Scaffold) DeployTestService() {
450450
func (s *Scaffold) afterEach() {
451451
defer GinkgoRecover()
452452
s.DeleteGatewayGroup(s.gatewaygroupid)
453+
_, _ = fmt.Fprintf(GinkgoWriter, "s.namespace: %s\n", s.namespace)
454+
_, _ = fmt.Fprintf(GinkgoWriter, "s.kubectlOptions: %+v\n", s.kubectlOptions)
453455

454456
if CurrentSpecReport().Failed() {
455457
if os.Getenv("TSET_ENV") == "CI" {
@@ -462,15 +464,12 @@ func (s *Scaffold) afterEach() {
462464
if output != "" {
463465
_, _ = fmt.Fprintln(GinkgoWriter, output)
464466
}
465-
_, _ = fmt.Fprintf(GinkgoWriter, "s.namespace: %s\n", s.namespace)
466467
}
467468
}
468469

469470
// if the test case is successful, just delete namespace
470-
if !CurrentSpecReport().Failed() {
471-
err := k8s.DeleteNamespaceE(s.t, s.kubectlOptions, s.namespace)
472-
Expect(err).NotTo(HaveOccurred(), "deleting namespace "+s.namespace)
473-
}
471+
err := k8s.DeleteNamespaceE(s.t, s.kubectlOptions, s.namespace)
472+
Expect(err).NotTo(HaveOccurred(), "deleting namespace "+s.namespace)
474473

475474
for _, f := range s.finalizers {
476475
runWithRecover(f)

0 commit comments

Comments
 (0)