From 304e4a71b3084369046624f75f50fd7a18aa9700 Mon Sep 17 00:00:00 2001 From: Yauheni Kaliuta Date: Mon, 13 May 2024 21:59:15 +0300 Subject: [PATCH] tests: e2e: run components deletion as separate parallel tests Use the same logic as for creation to speed up a bit. Signed-off-by: Yauheni Kaliuta --- tests/e2e/dsc_deletion_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/e2e/dsc_deletion_test.go b/tests/e2e/dsc_deletion_test.go index 03e53c9bd96..15fcd6adb32 100644 --- a/tests/e2e/dsc_deletion_test.go +++ b/tests/e2e/dsc_deletion_test.go @@ -33,7 +33,7 @@ func deletionTestSuite(t *testing.T) { require.NoError(t, err, "Error to delete DSC instance") }) t.Run("Deletion: Application Resource", func(t *testing.T) { - err = testCtx.testAllApplicationDeletion() + err = testCtx.testAllApplicationDeletion(t) require.NoError(t, err, "Error to delete component") }) t.Run("Deletion: DSCI instance", func(t *testing.T) { @@ -85,7 +85,7 @@ func (tc *testContext) testApplicationDeletion(component components.ComponentInt return nil } -func (tc *testContext) testAllApplicationDeletion() error { +func (tc *testContext) testAllApplicationDeletion(t *testing.T) error { //nolint:thelper // Deletion all listed components' deployments components, err := tc.testDsc.GetComponents() @@ -94,9 +94,12 @@ func (tc *testContext) testAllApplicationDeletion() error { } for _, c := range components { - if err = tc.testApplicationDeletion(c); err != nil { - return err - } + c := c + t.Run("Delete "+c.GetComponentName(), func(t *testing.T) { + t.Parallel() + err = tc.testApplicationDeletion(c) + require.NoError(t, err) + }) } return nil