Skip to content

Commit

Permalink
Merge pull request #1 from Orange-OpenSource/cookie-integration-test
Browse files Browse the repository at this point in the history
Change foo.com domain for localhost.
  • Loading branch information
fabricereix authored Aug 31, 2020
2 parents 874c7c2 + 9aaa346 commit 3d2d9e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions integration/tests/cookies.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ header "Set-Cookie" contains "Max-Age=0" # TODO replace by cookie query
GET http://localhost:8000/cookies/set
HTTP/1.0 200
Set-Cookie: LSID=DQAAAKEaem_vYg; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/accounts
Set-Cookie: HSID=AYQEVnDKrdst; Domain=.foo.com; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; Path=/
Set-Cookie: SSID=Ap4PGTEq; Domain=.foo.com; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/
Set-Cookie: HSID=AYQEVnDKrdst; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; Path=/
Set-Cookie: SSID=Ap4PGTEq; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/

[Asserts]
header "Set-Cookie" countEquals 3
Expand Down
8 changes: 4 additions & 4 deletions integration/tests/cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ def set_session_cookie2_valuea_subdomain2():


# Set-Cookie: LSID=; Path=/accounts; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly
# Set-Cookie: HSID=AYQEVn…DKrdst; Domain=.foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly
# Set-Cookie: SSID=Ap4P…GTEq; Domain=foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly
# Set-Cookie: HSID=AYQEVn…DKrdst; Domain=.localhost; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly
# Set-Cookie: SSID=Ap4P…GTEq; Domain=.localhost; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly
@app.route("/cookies/set")
def set_cookies():
resp = make_response()
resp.set_cookie('LSID', 'DQAAAKEaem_vYg', path='/accounts', secure=True, httponly=True, expires='Wed, 13 Jan 2021 22:23:01 GMT')
resp.set_cookie('HSID', 'AYQEVnDKrdst', domain='.foo.com', path='/', expires='Wed, 13 Jan 2021 22:23:01 GMT', httponly=True)
resp.set_cookie('SSID', 'Ap4PGTEq',domain='.foo.com', path='/', expires='Wed, 13 Jan 2021 22:23:01 GMT', secure=True, httponly=True)
resp.set_cookie('HSID', 'AYQEVnDKrdst', domain='.localhost', path='/', expires='Wed, 13 Jan 2021 22:23:01 GMT', httponly=True)
resp.set_cookie('SSID', 'Ap4PGTEq', domain='.localhost', path='/', expires='Wed, 13 Jan 2021 22:23:01 GMT', secure=True, httponly=True)
return resp


Expand Down

0 comments on commit 3d2d9e3

Please sign in to comment.