Skip to content

Commit

Permalink
testing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
feyruzb committed Oct 3, 2024
1 parent cc9ce96 commit 6a44b25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions web/server/codechecker_server/api/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def createLink(self, provider):
"State code insertion failed.")

LOG.debug(f"State {state} inserted successfully with ID {state_id}")
print(url + "&state_id=" + str(state_id)) # added here re1move
return url + "&state_id=" + str(state_id)

@timeit
Expand Down
3 changes: 2 additions & 1 deletion web/tests/functional/authentication/oauth_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def login_tester(self):
if query_result:
state = params['state']
code = query_result['code']
return self.show_json({"code": code, "state": state})
state_id = params['state_id'] # added here re1move
return self.show_json({"code": code, "state": state, "state_id": state_id}) # added here re1move
return self.show_rejection("Invalid credentials")
except IndexError:
return self.show_rejection("Invalid query parameters")
Expand Down
6 changes: 3 additions & 3 deletions web/tests/functional/authentication/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ def try_login(self, provider, username, password):
raise RequestFailed(data['error'])

link = link.split('?')[0]
code, state = data['code'], data['state']
auth_string = f"{link}?code={code}&state={state}"

code, state, state_id = data['code'], data['state'], data['state_id'] # added here re1move
auth_string = f"{link}?code={code}&state={state}&state_id={state_id}" # added here re1move
#login?code=b297074a409d34818198&state=msuPS01qPAQrTsxYKMeVpDlG0hd3uc&state_id=4
self.session_token = auth_client.performLogin(
"oauth", provider + "@" + auth_string)

Expand Down

0 comments on commit 6a44b25

Please sign in to comment.