diff --git a/test/tests/components/ws-manager/dotfiles_test.go b/test/tests/components/ws-manager/dotfiles_test.go index 592499f6f963f1..0e4b5c8a6acce6 100644 --- a/test/tests/components/ws-manager/dotfiles_test.go +++ b/test/tests/components/ws-manager/dotfiles_test.go @@ -45,12 +45,14 @@ func TestDotfiles(t *testing.T) { t.Fatal(err) } + // Scopes should larger than https://github.com/gitpod-io/gitpod/blob/main/components/supervisor/pkg/serverapi/publicapi.go#L99-L109 tokenId, err := api.CreateOAuth2Token(username, []string{ "function:getToken", "function:openPort", "function:getOpenPorts", "function:guessGitTokenScopes", "function:getWorkspace", + "function:sendHeartBeat", "function:trackEvent", "resource:token::*::get", }) @@ -70,8 +72,8 @@ func TestDotfiles(t *testing.T) { "token": "%v", "kind": "gitpod", "host": "%v", - "scope": ["function:getToken", "function:openPort", "function:getOpenPorts", "function:guessGitTokenScopes", "function:getWorkspace", "function:trackEvent", "resource:token::*::get"], - "expiryDate": "2022-10-26T10:38:05.232Z", + "scope": ["function:getToken", "function:openPort", "function:sendHeartBeat", "function:getOpenPorts", "function:guessGitTokenScopes", "function:getWorkspace", "function:trackEvent", "resource:token::*::get"], + "expiryDate": "2026-10-26T10:38:05.232Z", "reuse": 4 }]`, tokenId, getHostUrl(ctx, t, cfg.Client(), cfg.Namespace())), }, @@ -174,6 +176,15 @@ func assertDotfiles(t *testing.T, rsa *integration.RpcClient) error { } if len(dotfiles) > 0 { + var cat agent.ExecResponse + err := rsa.Call("WorkspaceAgent.Exec", &agent.ExecRequest{ + Dir: "/", + Command: "cat", + Args: []string{"/home/gitpod/.dotfiles.log"}, + }, &cat) + if err == nil { + t.Fatalf("dotfiles were not installed successfully: %+v, .dotfiles.log: %s", dotfiles, cat.Stdout) + } t.Fatalf("dotfiles were not installed successfully: %+v", dotfiles) }