@@ -45,12 +45,14 @@ func TestDotfiles(t *testing.T) {
45
45
t .Fatal (err )
46
46
}
47
47
48
+ // Scopes should larger than https://github.com/gitpod-io/gitpod/blob/main/components/supervisor/pkg/serverapi/publicapi.go#L99-L109
48
49
tokenId , err := api .CreateOAuth2Token (username , []string {
49
50
"function:getToken" ,
50
51
"function:openPort" ,
51
52
"function:getOpenPorts" ,
52
53
"function:guessGitTokenScopes" ,
53
54
"function:getWorkspace" ,
55
+ "function:sendHeartBeat" ,
54
56
"function:trackEvent" ,
55
57
"resource:token::*::get" ,
56
58
})
@@ -70,8 +72,8 @@ func TestDotfiles(t *testing.T) {
70
72
"token": "%v",
71
73
"kind": "gitpod",
72
74
"host": "%v",
73
- "scope": ["function:getToken", "function:openPort", "function:getOpenPorts", "function:guessGitTokenScopes", "function:getWorkspace", "function:trackEvent", "resource:token::*::get"],
74
- "expiryDate": "2022 -10-26T10:38:05.232Z",
75
+ "scope": ["function:getToken", "function:openPort", "function:sendHeartBeat", "function: getOpenPorts", "function:guessGitTokenScopes", "function:getWorkspace", "function:trackEvent", "resource:token::*::get"],
76
+ "expiryDate": "2026 -10-26T10:38:05.232Z",
75
77
"reuse": 4
76
78
}]` , tokenId , getHostUrl (ctx , t , cfg .Client (), cfg .Namespace ())),
77
79
},
@@ -174,6 +176,15 @@ func assertDotfiles(t *testing.T, rsa *integration.RpcClient) error {
174
176
}
175
177
176
178
if len (dotfiles ) > 0 {
179
+ var cat agent.ExecResponse
180
+ err := rsa .Call ("WorkspaceAgent.Exec" , & agent.ExecRequest {
181
+ Dir : "/" ,
182
+ Command : "cat" ,
183
+ Args : []string {"/home/gitpod/.dotfiles.log" },
184
+ }, & cat )
185
+ if err == nil {
186
+ t .Fatalf ("dotfiles were not installed successfully: %+v, .dotfiles.log: %s" , dotfiles , cat .Stdout )
187
+ }
177
188
t .Fatalf ("dotfiles were not installed successfully: %+v" , dotfiles )
178
189
}
179
190
0 commit comments