From 98c21950aadfcec25060455ea98aff951c493abc Mon Sep 17 00:00:00 2001 From: travisn Date: Mon, 14 Oct 2019 16:43:47 -0600 Subject: [PATCH] tests: mark failed test for log collection The logs are only collected by default if a test failed. Ensure that we collect the logs if the test setup step failed. Signed-off-by: travisn --- tests/integration/ceph_multi_cluster_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/ceph_multi_cluster_test.go b/tests/integration/ceph_multi_cluster_test.go index 5c1761bdc..87494cb29 100644 --- a/tests/integration/ceph_multi_cluster_test.go +++ b/tests/integration/ceph_multi_cluster_test.go @@ -194,12 +194,14 @@ func (o MCTestOperations) Teardown() { func (o MCTestOperations) startCluster(namespace, store string, errCh chan error) { logger.Infof("starting cluster %s", namespace) if err := o.installer.CreateK8sRookCluster(namespace, o.systemNamespace, store); err != nil { + o.T().Fail() o.installer.GatherAllRookLogs(o.T().Name(), namespace, o.systemNamespace) errCh <- fmt.Errorf("failed to create cluster %s. %+v", namespace, err) return } if err := o.installer.CreateK8sRookToolbox(namespace); err != nil { + o.T().Fail() o.installer.GatherAllRookLogs(o.T().Name(), namespace, o.systemNamespace) errCh <- fmt.Errorf("failed to create toolbox for %s. %+v", namespace, err) return