Skip to content

Commit eacca79

Browse files
utam0kroboquat
authored andcommitted
test: Workspace testing does not guarantee branch name creation
1 parent 7ef8911 commit eacca79

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/tests/workspace/contexts_test.go

+5-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package workspace
66

77
import (
88
"context"
9-
"fmt"
109
"os"
1110
"testing"
1211
"time"
@@ -43,12 +42,10 @@ func TestGitHubContexts(t *testing.T) {
4342
ExpectedBranch: "integration-test-1",
4443
},
4544
{
45+
// Branch name decisions are not tested in the workspace as it is the server side logic
4646
Name: "open issue",
4747
ContextURL: "github.com/gitpod-io/gitpod-test-repo/issues/88",
4848
WorkspaceRoot: "/workspace/gitpod-test-repo",
49-
ExpectedBranchFunc: func(username string) string {
50-
return fmt.Sprintf("%s/integration-88", username)
51-
},
5249
},
5350
{
5451
Name: "open tag",
@@ -94,9 +91,6 @@ func TestGitLabContexts(t *testing.T) {
9491
Name: "open issue",
9592
ContextURL: "gitlab.com/AlexTugarev/gp-test/issues/1",
9693
WorkspaceRoot: "/workspace/gp-test",
97-
ExpectedBranchFunc: func(username string) string {
98-
return fmt.Sprintf("%s/write-a-readme-1", username)
99-
},
10094
},
10195
{
10296
Name: "open tag",
@@ -164,6 +158,10 @@ func runContextTests(t *testing.T, tests []ContextTest) {
164158
defer rsa.Close()
165159
integration.DeferCloser(t, closer)
166160

161+
if test.ExpectedBranch == "" && test.ExpectedBranchFunc == nil {
162+
return
163+
}
164+
167165
// get actual from workspace
168166
git := common.Git(rsa)
169167
err = git.ConfigSafeDirectory()

0 commit comments

Comments
 (0)