Kyle Brennan 99eb2593d5
[test] Fix workspace integration tests (#17222)
* [tests] unique ContextURL for commit only

* [tests] include std output in the error message for commit

Sometimes commit fails with status 1 w/o error output...so it's helpful to look at StdOut

* [tests] Fix TestGitActions by using the test case context

Prior to this, createWorkspace was working, but getWorkspace could not find the created workspace.

* [test] bypass exit code 1 on `git commit` with `--allow-empty`

* [test] Fix gcloud auth, do setup before auth

* Show all output

Might remove later...

* [test] avoid using deleted user, identity, and token

* [test] add organizationId to CreateWorkspaceOptions

It's expected on the Typescript side:
90b7d65858/components/server/src/workspace/gitpod-server-impl.ts (L1227-L1235)

* [test] orgId is required on createWorkspace

But sometimes there's no team 🤷

* [test] fix git context tests

We use UBP now, there is no more unleashed.

Also, remove the "ff" feature flag code (which was for PVC). It was mutating the username, resulting in Code 460 errors on createWorkspace

* [test] Use example test as the example

* [test] fix context tests when run as gitpod-integration-test user

* [test] clean-up

* [test] wait for workspaces to stop

Tests intermittently fail with  to avoid intermittent failures

* [test] add code owners

This way, we can assert tests are passing for all teams prior to merging

* [test] limit # of tests that can run in parallel

* [test] no parallel tests

Test to see if flakeyness goes away...
...and bump the timeout because we reduced parallel runs

* [preview] update the VM image to have parity with production

This:
1. updates from K3s 1.23 to 1.26
2. requires that we remove PodSecurityPolicy changes (as it's no longer supported)
3. resolves intermittent disk pressure issues

* [preview] no PSP in support of VM image update

* We were getting PSP from rook/ceph, which I think was for PVC
* We were getting PSP from the monitoring-satellite

* [test] don't wait for workspace stop with git_test.go, we're testing git actions.

Why? We miss state transitions, it's not guaranteed each one will be returned, and there are other tests waiting.

For example, in the below log, we miss INITIALIZING, RUNNING, and STOPPING.

 workspace.go:369: attempt to create the workspace as user 0565bb3c-e724-4da9-84fb-22e2a7b23b8c, with context github.com/gitpod-io/gitpod-test-repo/tree/integration-test/commit
    workspace.go:411: attempt to get the workspace information: gitpodio-gitpodtestrepo-nscsowy1njb
    workspace.go:423: not preparing
    workspace.go:432: got the workspace information: gitpodio-gitpodtestrepo-nscsowy1njb
    workspace.go:460: wait for workspace to be fully up and running
    workspace.go:569: prepare for a connection with ws-manager
    workspace.go:590: established for a connection with ws-manager
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, PENDING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, PENDING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:504: waiting for stopping the workspace: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:514: attemp to delete the workspace: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:797: confirmed the worksapce is stopped: 462f1325-3019-4547-8666-508e8353335e, STOPPED
    workspace.go:538: successfully terminated workspace
    git_test.go:172: failed to wait for the workspace to start up: cannot wait for workspace: context deadline exceeded

* [preview] retry installing trust-manager

And use trust-manager from the packer image

* [test] clarify USER_TOKEN value for preview environments

* Cleanup

* [preview] remove commented out yaml related to PodSecurityPolicy
2023-05-04 04:07:41 +08:00
..
2022-12-08 13:05:19 -03:00
2022-12-08 13:05:19 -03:00
2022-12-08 13:05:19 -03:00
2022-12-08 13:05:19 -03:00