forked from kedacore/http-add-on
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanup_test.go
42 lines (32 loc) · 1.22 KB
/
cleanup_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//go:build e2e
// +build e2e
package utils
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
. "github.com/kedacore/http-add-on/tests/helper"
)
func TestRemoveKEDAHttpAddOn(t *testing.T) {
out, err := ExecuteCommandWithDir("make undeploy", "../..")
require.NoErrorf(t, err, "error removing KEDA Http Add-on - %s", err)
t.Log(string(out))
t.Log("KEDA Http Add-on removed successfully using 'make undeploy' command")
}
func TestRemoveKEDA(t *testing.T) {
_, err := ExecuteCommand(fmt.Sprintf("helm uninstall keda --namespace %s", KEDANamespace))
require.NoErrorf(t, err, "cannot uninstall KEDA - %s", err)
}
func TestRemoveIngress(t *testing.T) {
_, err := ExecuteCommand(fmt.Sprintf("helm uninstall %s --namespace %s", IngressReleaseName, IngressNamespace))
require.NoErrorf(t, err, "cannot uninstall ingress - %s", err)
DeleteNamespace(t, IngressNamespace)
}
func TestRemoveArgoRollouts(t *testing.T) {
_, err := ExecuteCommand(fmt.Sprintf("helm uninstall %s --namespace %s", ArgoRolloutsName, ArgoRolloutsNamespace))
require.NoErrorf(t, err, "cannot uninstall ingress - %s", err)
DeleteNamespace(t, ArgoRolloutsNamespace)
}
func TestRemoveKEDANamespace(t *testing.T) {
DeleteNamespace(t, KEDANamespace)
}