Skip to content

Commit

Permalink
test: adjustments for broker and other minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Jan 14, 2025
1 parent 6a4c4ef commit 3d097fc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
8 changes: 8 additions & 0 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/testdata/taskqos/lagoon-task-2xpyz5m.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
\"environment\": {
\"id\": 1,
\"environmentType\": \"production\",
\"environmentType\": \"development\",
\"name\": \"dev1\",
\"project\": \"nginx-example\"
},
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/testdata/taskqos/lagoon-task-3xpyz5m.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
\"environment\": {
\"id\": 1,
\"environmentType\": \"production\",
\"environmentType\": \"development\",
\"name\": \"dev2\",
\"project\": \"nginx-example\"
},
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/testdata/taskqos/lagoon-task-4xpyz5m.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
\"environment\": {
\"id\": 1,
\"environmentType\": \"production\",
\"environmentType\": \"development\",
\"name\": \"dev3\",
\"project\": \"nginx-example\"
},
Expand Down
10 changes: 10 additions & 0 deletions test/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"os"
"os/exec"
"strings"
"time"

"github.com/onsi/ginkgo/v2"
)
Expand All @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit 3d097fc

Please sign in to comment.