From 43ce4d19ee1249096ee5adc4408beb809903a467 Mon Sep 17 00:00:00 2001 From: Ara Pulido Date: Tue, 11 Jan 2022 11:03:35 +0100 Subject: [PATCH] Clean datadog namespaces before running tests Signed-off-by: Ara Pulido --- tests/scalers/datadog.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/scalers/datadog.test.ts b/tests/scalers/datadog.test.ts index 55963c14c98..e261ad55f68 100644 --- a/tests/scalers/datadog.test.ts +++ b/tests/scalers/datadog.test.ts @@ -39,8 +39,16 @@ test.before(t => { datadogSite = 'datadoghq.com' } + sh.config.silent = true + + sh.exec(`kubectl delete namespace ${datadogNamespace} --force`) + sh.exec(`kubectl delete namespace ${testNamespace} --force`) + sh.exec(`helm repo add datadog ${datadogHelmRepo}`) sh.exec(`helm repo update`) + + sh.config.silent = false + let helmInstallStatus = sh.exec(`helm upgrade \ --install \ --set datadog.apiKey=${datadogApiKey} \