Skip to content

Fix the workspace integration tests that need a username in DB first #9627

Closed
@jenting

Description

@jenting

Bug description

The following integration tests need a username in DB first, however, the integration test should be able to mock the username into the DB rather than have a real username in DB.

  • TestGitHubContexts
  • TestWorkspaceInstrumentation
  • TestGitActions

Steps to reproduce

$ go test -v ./... \
  -kubeconfig=/home/gitpod/.kube/config \
  -namespace=<namespace>

The above tests are skipped because of missing the username. The error message would be

cannot start server: "cannot access Gitpod server API: \"no suitable user found: make sure there's at least one non-builtin user in the database (e.g. login)\""

Even if we provide the username to it, the integration tests could be failed because the username doesn't in the DB.

$ go test -v ./... \
  -kubeconfig=/home/gitpod/.kube/config \
  -namespace=<namespace>
  -username=integration-test

Ref werft job

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions