From 40d37a165f7180945507fd71ee82ba92aebb41f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 26 Jun 2019 22:13:15 +0200 Subject: [PATCH] test framework: collect logs earlier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Logs will be lost if we collect them after pods are uninstalled. So we need to collect them before purging. Signed-off-by: Sébastien Han --- tests/framework/installer/ceph_installer.go | 3 +++ tests/integration/base_deploy_test.go | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/framework/installer/ceph_installer.go b/tests/framework/installer/ceph_installer.go index 206b880fa..9119a3310 100644 --- a/tests/framework/installer/ceph_installer.go +++ b/tests/framework/installer/ceph_installer.go @@ -365,6 +365,9 @@ func (h *CephInstaller) UninstallRookFromMultipleNS(systemNamespace string, name h.checkCephHealthStatus(namespace) } + // Gather logs after status checks + h.GatherAllRookLogs(namespace, SystemNamespace(namespace), h.T().Name()) + roles := h.Manifests.GetClusterRoles(namespace, systemNamespace) _, err = h.k8shelper.KubectlWithStdin(roles, deleteFromStdinArgs...) diff --git a/tests/integration/base_deploy_test.go b/tests/integration/base_deploy_test.go index 17f516111..5cb801c0f 100644 --- a/tests/integration/base_deploy_test.go +++ b/tests/integration/base_deploy_test.go @@ -140,6 +140,5 @@ func (op *TestCluster) SetInstallData(version string) {} // TearDownRook is a wrapper for tearDown after Suite func (op *TestCluster) Teardown() { - op.installer.GatherAllRookLogs(op.namespace, installer.SystemNamespace(op.namespace), op.installer.T().Name()) op.installer.UninstallRook(op.namespace) }