Skip to content

Add labels to the E2E tests #9577

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

Closed
wants to merge 4 commits into from
Closed
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
3 changes: 2 additions & 1 deletion test/tests/ide/jetbrains/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ func TestJetBrainsGatewayWorkspace(t *testing.T) {
integration.SkipWithoutUserToken(t, userToken)

f := features.New("Start a workspace and let JetBrains Gateway connect").
WithLabel("component", "IDE").
WithLabel("team", "IDE").
WithLabel("component", "jetbrains").
Assess("it can start a workspace and let JetBrains Gateway connect", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute)
defer cancel()
Expand Down
3 changes: 2 additions & 1 deletion test/tests/ide/vscode/python_ws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func TestPythonExtWorkspace(t *testing.T) {
integration.SkipWithoutUserToken(t, userToken)

f := features.New("PythonExtensionWorkspace").
WithLabel("component", "server").
WithLabel("team", "IDE").
WithLabel("component", "vscode").
Assess("it can run python extension in a workspace", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
5 changes: 3 additions & 2 deletions test/tests/workspace/cgroup_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ import (

agent "github.com/gitpod-io/gitpod/test/pkg/agent/workspace/api"
"github.com/gitpod-io/gitpod/test/pkg/integration"
"github.com/gitpod-io/gitpod/test/tests/workspace/common"
"github.com/gitpod-io/gitpod/test/pkg/integration/common"
"github.com/google/go-cmp/cmp"
)

func TestCgroupV2(t *testing.T) {
f := features.New("cgroup v2").
WithLabel("component", "workspace").
WithLabel("team", "workspace").
WithLabel("component", "runtime").
Assess("it should create a new cgroup when cgroup v2 is enabled", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
103 changes: 0 additions & 103 deletions test/tests/workspace/common/git-client.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func TestUploadUrl(t *testing.T) {
}

f := features.New("UploadUrlRequest").
WithLabel("team", "workspace").
WithLabel("component", "content-service").
Assess("it should run content-service tests", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down Expand Up @@ -123,7 +124,8 @@ func TestDownloadUrl(t *testing.T) {
}

f := features.New("DownloadUrl").
WithLabel("component", "server").
WithLabel("team", "workspace").
WithLabel("component", "content-service").
Assess("it should pass download URL tests", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down Expand Up @@ -169,7 +171,8 @@ func TestDownloadUrl(t *testing.T) {

func TestUploadDownloadBlob(t *testing.T) {
f := features.New("UploadDownloadBlob").
WithLabel("component", "server").
WithLabel("team", "workspace").
WithLabel("component", "content-service").
Assess("it should upload and download blob", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down Expand Up @@ -218,7 +221,8 @@ func TestUploadDownloadBlob(t *testing.T) {
func TestUploadDownloadBlobViaServer(t *testing.T) {
integration.SkipWithoutUsername(t, username)
f := features.New("UploadDownloadBlobViaServer").
WithLabel("component", "content-server").
WithLabel("team", "workspace").
WithLabel("component", "content-service").
Assess("it should uploads a blob via server → content-server and downloads it afterwards", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
4 changes: 2 additions & 2 deletions test/tests/workspace/contexts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"sigs.k8s.io/e2e-framework/pkg/features"

"github.com/gitpod-io/gitpod/test/pkg/integration"
"github.com/gitpod-io/gitpod/test/tests/workspace/common"
"github.com/gitpod-io/gitpod/test/pkg/integration/common"
)

type ContextTest struct {
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestGitLabContexts(t *testing.T) {
func runContextTests(t *testing.T, tests []ContextTest) {
integration.SkipWithoutUsername(t, username)
f := features.New("context").
WithLabel("component", "server").
WithLabel("team", "workspace").
Assess("should run context tests", func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context {
for _, test := range tests {
t.Run(test.ContextURL, func(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion test/tests/workspace/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (

func TestRunDocker(t *testing.T) {
f := features.New("docker").
WithLabel("component", "workspace").
WithLabel("team", "workspace").
WithLabel("component", "runtime").
Assess("it should start a container", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
4 changes: 2 additions & 2 deletions test/tests/workspace/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
func TestWorkspaceInstrumentation(t *testing.T) {
integration.SkipWithoutUsername(t, username)
f := features.New("instrumentation").
WithLabel("component", "server").
WithLabel("team", "workspace").
Assess("it can instrument a workspace", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestWorkspaceInstrumentation(t *testing.T) {

func TestLaunchWorkspaceDirectly(t *testing.T) {
f := features.New("workspace").
WithLabel("component", "server").
WithLabel("team", "workspace").
Assess("it can run workspace tasks", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
5 changes: 3 additions & 2 deletions test/tests/workspace/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

agent "github.com/gitpod-io/gitpod/test/pkg/agent/workspace/api"
"github.com/gitpod-io/gitpod/test/pkg/integration"
"github.com/gitpod-io/gitpod/test/tests/workspace/common"
"github.com/gitpod-io/gitpod/test/pkg/integration/common"
)

//
Expand Down Expand Up @@ -98,7 +98,8 @@ func TestGitActions(t *testing.T) {
}

f := features.New("GitActions").
WithLabel("component", "server").
WithLabel("team", "workspace").
WithLabel("component", "git").
Assess("it can run git actions", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

func TestBaseImageBuild(t *testing.T) {
f := features.New("database").
WithLabel("team", "workspace").
WithLabel("component", "image-builder").
Assess("it should build a base image", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down Expand Up @@ -99,6 +100,7 @@ func TestBaseImageBuild(t *testing.T) {

func TestParallelBaseImageBuild(t *testing.T) {
f := features.New("image-builder").
WithLabel("team", "workspace").
WithLabel("component", "image-builder").
Assess("it should allow parallel build of images", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down
5 changes: 3 additions & 2 deletions test/tests/workspace/k3s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import (

agent "github.com/gitpod-io/gitpod/test/pkg/agent/workspace/api"
"github.com/gitpod-io/gitpod/test/pkg/integration"
"github.com/gitpod-io/gitpod/test/tests/workspace/common"
"github.com/gitpod-io/gitpod/test/pkg/integration/common"
)

func TestK3s(t *testing.T) {
f := features.New("k3s").
WithLabel("component", "workspace").
WithLabel("team", "workspace").
WithLabel("component", "k3s").
Assess("it should start a k3s when cgroup v2 enable", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
3 changes: 2 additions & 1 deletion test/tests/workspace/mount_proc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func loadMountProc(t *testing.T, rsa *rpc.Client) {

func TestMountProc(t *testing.T) {
f := features.New("proc mount").
WithLabel("component", "workspace").
WithLabel("team", "workspace").
WithLabel("component", "runtime").
Assess("load test proc mount", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (

func TestCreateBucket(t *testing.T) {
f := features.New("DaemonAgent.CreateBucket").
WithLabel("team", "workspace").
WithLabel("component", "ws-daemon").
Assess("it should create a bucket", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
// TestBackup tests a basic start/modify/restart cycle
func TestBackup(t *testing.T) {
f := features.New("backup").
WithLabel("team", "workspace").
WithLabel("component", "ws-manager").
Assess("it should start a workspace, create a file and successfully create a backup", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down Expand Up @@ -136,7 +138,8 @@ func TestBackup(t *testing.T) {
// TestMissingBackup ensures workspaces fail if they should have a backup but don't have one
func TestMissingBackup(t *testing.T) {
f := features.New("CreateWorkspace").
WithLabel("component", "server").
WithLabel("team", "workspace").
WithLabel("component", "ws-manager").
Assess("it can run workspace tasks", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

func TestPrebuildWorkspaceTaskSuccess(t *testing.T) {
f := features.New("prebuild").
WithLabel("team", "workspace").
WithLabel("component", "ws-manager").
Assess("it should create a prebuild and succeed the defined tasks", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down Expand Up @@ -55,7 +56,8 @@ func TestPrebuildWorkspaceTaskFail(t *testing.T) {
t.Skip("status never returns HeadlessTaskFailed (exit 1)")

f := features.New("prebuild").
WithLabel("component", "server").
WithLabel("team", "workspace").
WithLabel("component", "ws-manager").
Assess("it should create a prebuild and fail after running the defined tasks", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func TestRegularWorkspaceTasks(t *testing.T) {
}

f := features.New("ws-manager").
WithLabel("team", "workspace").
WithLabel("component", "ws-manager").
WithLabel("type", "tasks").
Assess("it can run workspace tasks", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

func TestGetWorkspaces(t *testing.T) {
f := features.New("workspaces").
WithLabel("team", "workspace").
WithLabel("component", "ws-manager").
Assess("it should get workspaces", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down