Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e test for ui issue #50

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ lint: $(FAILLINT) $(GOLANGCI_LINT) $(MISSPELL) build format docs check-git deps
test-e2e:
@rm -rf ./test/e2e/e2e_*
@rm -rf ./test/e2e/tmp
@go test -v -timeout 99m github.com/observatorium/obsctl/test/e2e
@go test -v -timeout 99m -run ^TestObsctlMetricsCommands$ github.com/observatorium/obsctl/test/e2e
13 changes: 13 additions & 0 deletions test/e2e/obsctl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,19 @@ func TestObsctlMetricsCommands(t *testing.T) {
e := preTest(t)
testutil.Ok(t, os.Setenv("OBSCTL_CONFIG_PATH", filepath.Join(e.SharedDir(), "obsctl", "config.json")))

t.Run("get ui", func(t *testing.T) {
b := bytes.NewBufferString("")

contextCmd := cmd.NewObsctlCmd(context.Background())

contextCmd.SetOut(b)
contextCmd.SetArgs([]string{"metrics", "ui"})
testutil.Ok(t, contextCmd.Execute())

time.Sleep(time.Second * 500)

})

t.Run("get labels for a tenant", func(t *testing.T) {
b := bytes.NewBufferString("")

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// Adapted from https://github.com/observatorium/api/blob/main/test/e2e/services.go.

const (
apiImage = "quay.io/observatorium/api:latest"
apiImage = "quay.io/observatorium/api:main-2023-07-31-2bd304b"
upImage = "quay.io/observatorium/up:master-2021-02-12-03ef2f2"
thanosImage = "quay.io/thanos/thanos:v0.25.1"
thanosRuleSyncerImage = "quay.io/observatorium/thanos-rule-syncer:main-2022-02-01-d4c24bc"
Expand Down
Loading