@@ -233,7 +233,6 @@ func ParametrizedRouteTest(scenario TestCase) func(*testing.T) {
233233 rpConfig := config.RevproxyConfig {
234234 RenkuBaseURL : upstreamURL ,
235235 RenkuServices : config.RenkuServicesConfig {
236- Notebooks : upstreamURL ,
237236 Core : config.CoreSvcConfig {
238237 ServiceNames : []string {upstreamURL .String (), upstreamURL .String (), upstreamURL2 .String ()},
239238 ServicePaths : []string {"/api/renku" , "/api/renku/10" , "/api/renku/9" },
@@ -389,11 +388,11 @@ func TestInternalSvcRoutes(t *testing.T) {
389388 Expected : TestResults {
390389 VisitedServerIDs : []string {"upstream" },
391390 UpstreamRequestHeaders : []map [string ]string {{
392- "Authorization" : "" ,
393- "Renku-Auth-Id- Token" : "" ,
394- "Renku-Auth- Access-Token" : "" ,
395- "Renku-Auth-Refresh-Token" : "" ,
396- "Renku-Auth-Anon-Id" : "anon-sessionID" ,
391+ echo . HeaderAuthorization : "" ,
392+ "Gitlab-Access- Token" : "" ,
393+ "Gitlab- Access-Token-Expires-At" : "" ,
394+ "Renku-Auth-Refresh-Token" : "" ,
395+ "Renku-Auth-Anon-Id" : "anon-sessionID" ,
397396 }},
398397 },
399398 Sessions : []models.Session {
@@ -404,13 +403,14 @@ func TestInternalSvcRoutes(t *testing.T) {
404403 {
405404 Path : "/api/notebooks/test/acceptedAuth" ,
406405 Expected : TestResults {
407- Path : "/notebooks/test/acceptedAuth" ,
406+ Path : "/api/data/ notebooks/test/acceptedAuth" ,
408407 VisitedServerIDs : []string {"upstream" },
409408 UpstreamRequestHeaders : []map [string ]string {{
410- "Renku-Auth-Id-Token" : "idTokenValue" ,
411- "Renku-Auth-Access-Token" : "accessTokenValue" ,
412- "Renku-Auth-Refresh-Token" : "refreshTokenValue" ,
413- "Renku-Auth-Anon-Id" : "" ,
409+ echo .HeaderAuthorization : "Bearer accessTokenValue" ,
410+ "Gitlab-Access-Token" : "gitlabAccessTokenValue" ,
411+ "Gitlab-Access-Token-Expires-At" : "16746525971" ,
412+ "Renku-Auth-Refresh-Token" : "refreshTokenValue" ,
413+ "Renku-Auth-Anon-Id" : "" ,
414414 }},
415415 },
416416 Tokens : []models.AuthToken {
@@ -427,20 +427,21 @@ func TestInternalSvcRoutes(t *testing.T) {
427427 tokenProviderID ("renku" ),
428428 ),
429429 newTestToken (
430- models .IDTokenType ,
431- tokenID ("renku:myToken" ),
432- tokenPlainValue ("idTokenValue" ),
433- tokenProviderID ("renku" ),
430+ models .AccessTokenType ,
431+ tokenID ("gitlab:otherToken" ),
432+ tokenPlainValue ("gitlabAccessTokenValue" ),
433+ tokenProviderID ("gitlab" ),
434+ tokenExpiresAt (time .Unix (16746525971 , 0 )),
434435 ),
435436 },
436437 Sessions : []models.Session {
437- newTestSesssion (sessionID ("sessionID" ), withTokenIDs (map [string ]string {"renku" : "renku:myToken" })),
438+ newTestSesssion (sessionID ("sessionID" ), withTokenIDs (map [string ]string {"renku" : "renku:myToken" , "gitlab" : "gitlab:otherToken" })),
438439 },
439440 RequestCookie : & http.Cookie {Name : sessions .SessionCookieName , Value : "sessionID" },
440441 },
441442 {
442443 Path : "/api/notebooks" ,
443- Expected : TestResults {Path : "/notebooks" , VisitedServerIDs : []string {"upstream" }},
444+ Expected : TestResults {Path : "/api/data/ notebooks" , VisitedServerIDs : []string {"upstream" }},
444445 },
445446 {
446447 Path : "/api/search/test/rejectedAuth" ,
0 commit comments