diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 2eea145..2d92ec8 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -108,6 +108,14 @@ var _ = Describe("controller", Ordered, func() { if err == nil { fmt.Fprintf(GinkgoWriter, "info: %s\n", podlogs) } + // cmd = exec.Command("kubectl", "logs", + // controllerPodName, "-c", "manager", + // "-n", namespace, "--previous", + // ) + // podlogs, err = utils.Run(cmd) + // if err == nil { + // fmt.Fprintf(GinkgoWriter, "info: previous %s\n", podlogs) + // } } By("stop metrics consumer") diff --git a/test/e2e/testdata/taskqos/lagoon-task-2xpyz5m.json b/test/e2e/testdata/taskqos/lagoon-task-2xpyz5m.json index 1434436..41f1c75 100644 --- a/test/e2e/testdata/taskqos/lagoon-task-2xpyz5m.json +++ b/test/e2e/testdata/taskqos/lagoon-task-2xpyz5m.json @@ -18,7 +18,7 @@ }, \"environment\": { \"id\": 1, - \"environmentType\": \"production\", + \"environmentType\": \"development\", \"name\": \"dev1\", \"project\": \"nginx-example\" }, diff --git a/test/e2e/testdata/taskqos/lagoon-task-3xpyz5m.json b/test/e2e/testdata/taskqos/lagoon-task-3xpyz5m.json index 756275c..8d9b490 100644 --- a/test/e2e/testdata/taskqos/lagoon-task-3xpyz5m.json +++ b/test/e2e/testdata/taskqos/lagoon-task-3xpyz5m.json @@ -18,7 +18,7 @@ }, \"environment\": { \"id\": 1, - \"environmentType\": \"production\", + \"environmentType\": \"development\", \"name\": \"dev2\", \"project\": \"nginx-example\" }, diff --git a/test/e2e/testdata/taskqos/lagoon-task-4xpyz5m.json b/test/e2e/testdata/taskqos/lagoon-task-4xpyz5m.json index 22976dd..e3f5d90 100644 --- a/test/e2e/testdata/taskqos/lagoon-task-4xpyz5m.json +++ b/test/e2e/testdata/taskqos/lagoon-task-4xpyz5m.json @@ -18,7 +18,7 @@ }, \"environment\": { \"id\": 1, - \"environmentType\": \"production\", + \"environmentType\": \"development\", \"name\": \"dev3\", \"project\": \"nginx-example\" }, diff --git a/test/utils/utils.go b/test/utils/utils.go index 0f6aca2..2fe85df 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -21,6 +21,7 @@ import ( "os" "os/exec" "strings" + "time" "github.com/onsi/ginkgo/v2" ) @@ -42,6 +43,12 @@ func infoError(err error) { func StartLocalServices() error { cmd := exec.Command("docker", "compose", "up", "-d") _, err := Run(cmd) + if err != nil { + return err + } + time.Sleep(10 * time.Second) + cmd = exec.Command("docker", "compose", "exec", "local-broker", "rabbitmqadmin", "declare", "exchange", "--vhost=/", "name=lagoon-logs", "type=direct") + _, err = Run(cmd) return err } @@ -57,6 +64,9 @@ func StopLocalServices() { func CleanupNamespace(namespace string) { cmd := exec.Command("kubectl", "delete", "ns", namespace, "--timeout=30s") if _, err := Run(cmd); err != nil { + if strings.Contains(err.Error(), "not found") { + return + } infoError(err) } // check for builds