Skip to content

Commit f54ac3f

Browse files
fix: integration tests
1 parent 483d1c4 commit f54ac3f

File tree

3 files changed

+102
-92
lines changed

3 files changed

+102
-92
lines changed

api/openapi_client/client.go

Lines changed: 91 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

int/integration_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ var _ = Describe("cs monitor", func() {
241241
Context("Prometheus Metrics Endpoint", func() {
242242
It("should expose Prometheus metrics when no forward is specified", func() {
243243
By("Running 'cs monitor' command without forwarding (metrics only)")
244-
intutil.RunCommandInBackground(monitorOutputBuf,
244+
monitorCmdProcess = intutil.RunCommandInBackground(monitorOutputBuf,
245245
"monitor",
246246
"--address", fmt.Sprintf(":%d", monitorListenPort),
247247
"--", "sleep", "60s",
@@ -263,7 +263,7 @@ var _ = Describe("cs monitor", func() {
263263

264264
It("should redirect root to /metrics", func() {
265265
By("Running 'cs monitor' command without forwarding (metrics only)")
266-
intutil.RunCommandInBackground(monitorOutputBuf,
266+
monitorCmdProcess = intutil.RunCommandInBackground(monitorOutputBuf,
267267
"monitor",
268268
"--address", fmt.Sprintf(":%d", monitorListenPort),
269269
"--", "sleep", "60s",
@@ -357,7 +357,7 @@ var _ = Describe("Open Workspace Integration Tests", func() {
357357
)
358358

359359
BeforeEach(func() {
360-
teamId, _ = intutil.SkipIfMissingEnvVars()
360+
teamId, _ = intutil.FailIfMissingEnvVars()
361361
workspaceName = fmt.Sprintf("cli-open-test-%d", time.Now().Unix())
362362
})
363363

@@ -431,7 +431,7 @@ var _ = Describe("Workspace Edge Cases and Advanced Operations", func() {
431431
)
432432

433433
BeforeEach(func() {
434-
teamId, _ = intutil.SkipIfMissingEnvVars()
434+
teamId, _ = intutil.FailIfMissingEnvVars()
435435
workspaceName = fmt.Sprintf("cli-edge-test-%d", time.Now().Unix())
436436
})
437437

@@ -709,7 +709,7 @@ var _ = Describe("List Command Tests", func() {
709709
var teamId string
710710

711711
BeforeEach(func() {
712-
teamId, _ = intutil.SkipIfMissingEnvVars()
712+
teamId, _ = intutil.FailIfMissingEnvVars()
713713
})
714714

715715
Context("List Workspaces", func() {
@@ -849,7 +849,7 @@ var _ = Describe("Log Command Integration Tests", func() {
849849
)
850850

851851
BeforeEach(func() {
852-
teamId, _ = intutil.SkipIfMissingEnvVars()
852+
teamId, _ = intutil.FailIfMissingEnvVars()
853853
workspaceName = fmt.Sprintf("cli-log-test-%d", time.Now().Unix())
854854
})
855855

@@ -897,7 +897,7 @@ var _ = Describe("Start Pipeline Integration Tests", func() {
897897
)
898898

899899
BeforeEach(func() {
900-
teamId, _ = intutil.SkipIfMissingEnvVars()
900+
teamId, _ = intutil.FailIfMissingEnvVars()
901901
workspaceName = fmt.Sprintf("cli-pipeline-test-%d", time.Now().Unix())
902902
})
903903

@@ -944,7 +944,7 @@ var _ = Describe("Git Pull Integration Tests", func() {
944944
)
945945

946946
BeforeEach(func() {
947-
teamId, _ = intutil.SkipIfMissingEnvVars()
947+
teamId, _ = intutil.FailIfMissingEnvVars()
948948
workspaceName = fmt.Sprintf("cli-git-test-%d", time.Now().Unix())
949949
})
950950

@@ -991,7 +991,7 @@ var _ = Describe("Wake Up Workspace Integration Tests", func() {
991991
)
992992

993993
BeforeEach(func() {
994-
teamId, _ = intutil.SkipIfMissingEnvVars()
994+
teamId, _ = intutil.FailIfMissingEnvVars()
995995
workspaceName = fmt.Sprintf("cli-wakeup-test-%d", time.Now().Unix())
996996
})
997997

@@ -1165,7 +1165,7 @@ var _ = Describe("Curl Workspace Integration Tests", func() {
11651165
)
11661166

11671167
BeforeEach(func() {
1168-
teamId, _ = intutil.SkipIfMissingEnvVars()
1168+
teamId, _ = intutil.FailIfMissingEnvVars()
11691169
workspaceName = fmt.Sprintf("cli-curl-test-%d", time.Now().Unix())
11701170
})
11711171

int/util/test_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
ginkgo "github.com/onsi/ginkgo/v2"
1010
)
1111

12-
func SkipIfMissingEnvVars() (teamId, token string) {
12+
func FailIfMissingEnvVars() (teamId, token string) {
1313
teamId = os.Getenv("CS_TEAM_ID")
1414
if teamId == "" {
1515
ginkgo.Fail("CS_TEAM_ID environment variable not set")

0 commit comments

Comments
 (0)