Skip to content

Commit 13b6b66

Browse files
committed
workspace integration test: move TestGitLFSSupport under TestGitHubContexts
Signed-off-by: JenTing Hsiao <[email protected]>
1 parent 977835a commit 13b6b66

File tree

2 files changed

+3
-56
lines changed

2 files changed

+3
-56
lines changed

test/tests/workspace/contexts_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ func TestGitHubContexts(t *testing.T) {
5757
ExpectedBranch: "HEAD",
5858
},
5959
{
60-
Name: "empty repo",
61-
ContextURL: "github.com/gitpod-io/empty",
62-
WorkspaceRoot: "/workspace/empty",
60+
Name: "Git LFS support",
61+
ContextURL: "github.com/atduarte/lfs-test",
62+
WorkspaceRoot: "/workspace/lfs-test",
6363
ExpectedBranch: "main",
6464
},
6565
{

test/tests/workspace/git_test.go

-53
Original file line numberDiff line numberDiff line change
@@ -187,56 +187,3 @@ func TestGitActions(t *testing.T) {
187187

188188
testEnv.Test(t, f)
189189
}
190-
191-
func TestGitLFSSupport(t *testing.T) {
192-
userToken, _ := os.LookupEnv("USER_TOKEN")
193-
integration.SkipWithoutUsername(t, username)
194-
integration.SkipWithoutUserToken(t, userToken)
195-
196-
f := features.New("GitLFSSupport").
197-
WithLabel("component", "workspace").
198-
Assess("it can open a repo with Git LFS support", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
199-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
200-
defer cancel()
201-
202-
api := integration.NewComponentAPI(ctx, cfg.Namespace(), kubeconfig, cfg.Client())
203-
t.Cleanup(func() {
204-
api.Done(t)
205-
})
206-
207-
ffs := []struct {
208-
Name string
209-
FF string
210-
}{
211-
{Name: "classic"},
212-
{Name: "pvc", FF: "persistent_volume_claim"},
213-
}
214-
215-
for _, ff := range ffs {
216-
t.Run(ff.Name, func(t *testing.T) {
217-
username := username + ff.Name
218-
userId, err := api.CreateUser(username, userToken)
219-
if err != nil {
220-
t.Fatal(err)
221-
}
222-
223-
if err := api.UpdateUserFeatureFlag(userId, ff.FF); err != nil {
224-
t.Fatal(err)
225-
}
226-
227-
_, stopWS, err := integration.LaunchWorkspaceFromContextURL(ctx, "github.com/atduarte/lfs-test", username, api)
228-
if err != nil {
229-
t.Fatal(err)
230-
}
231-
232-
t.Cleanup(func() {
233-
stopWS(true)
234-
})
235-
})
236-
}
237-
return ctx
238-
}).
239-
Feature()
240-
241-
testEnv.Test(t, f)
242-
}

0 commit comments

Comments
 (0)