@@ -382,7 +382,7 @@ public function testExecute(): void
382382 $ response = $ this ->client ->call (Client::METHOD_POST , '/runtimes/test-exec/executions ' );
383383 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
384384 $ this ->assertEquals (200 , $ response ['body ' ]['statusCode ' ]);
385- $ this ->assertEquals ('cookie1=value1; Path=/; HttpOnly; Secure; SameSite=Lax, cookie2=value2; Path=/; HttpOnly; Secure; SameSite=Lax ' , \json_decode ($ response ['body ' ]['headers ' ], true )['set-cookie ' ]);
385+ $ this ->assertEquals ('aValue ' , \json_decode ($ response ['body ' ]['headers ' ], true )['x-key ' ]);
386386
387387 /** Execute on cold-started runtime */
388388 $ response = $ this ->client ->call (Client::METHOD_POST , '/runtimes/test-exec/executions ' , [], [
@@ -570,7 +570,10 @@ public function testSSRLogs(): void
570570 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
571571 $ this ->assertEquals (200 , $ response ['body ' ]['statusCode ' ]);
572572 $ this ->assertStringContainsString ('<p>OK</p> ' , $ response ['body ' ]['body ' ]);
573- $ this ->assertEquals ('astroCookie1=astroValue1; Max-Age=1800; HttpOnly, astroCookie2=astroValue2; Max-Age=1800; HttpOnly ' , \json_decode ($ response ['body ' ]['headers ' ], true )['set-cookie ' ]);
573+
574+ $ setCookieList = \json_decode ($ response ['body ' ]['headers ' ], true )['set-cookie ' ];
575+ $ this ->assertEquals ('astroCookie1=astroValue1; Max-Age=1800; HttpOnly ' , $ setCookieList [0 ]);
576+ $ this ->assertEquals ('astroCookie2=astroValue2; Max-Age=1800; HttpOnly ' , $ setCookieList [1 ]);
574577
575578 $ this ->assertNotEmpty ($ response ['body ' ]['logs ' ]);
576579 $ this ->assertStringContainsString ('Open runtimes log ' , $ response ['body ' ]['logs ' ]);
@@ -579,9 +582,17 @@ public function testSSRLogs(): void
579582 $ this ->assertNotEmpty ($ response ['body ' ]['errors ' ]);
580583 $ this ->assertStringContainsString ('Open runtimes error ' , $ response ['body ' ]['errors ' ]);
581584
585+ $ response = $ this ->client ->call (Client::METHOD_POST , '/runtimes/test-ssr-exec/executions ' , [
586+ 'x-executor-response-format ' => '0.10.0 ' // Last version to report string header values only
587+ ], $ params );
588+ $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
589+ $ this ->assertEquals (200 , $ response ['body ' ]['statusCode ' ]);
590+ $ this ->assertEquals ('astroCookie2=astroValue2; Max-Age=1800; HttpOnly ' , \json_decode ($ response ['body ' ]['headers ' ], true )['set-cookie ' ]);
591+
582592 /** Delete runtime */
583593 $ response = $ this ->client ->call (Client::METHOD_DELETE , '/runtimes/test-ssr-exec ' , [], []);
584594 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
595+ $ this ->assertEquals ('astroCookie1=astroValue1; Max-Age=1800; HttpOnly ' , $ setCookieList [0 ]);
585596 }
586597
587598 public function testRestartPolicy (): void
0 commit comments