Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestAuth_BasicAuth fails when system time is wrong. #472

Open
Morganamilo opened this issue Mar 15, 2022 · 0 comments
Open

TestAuth_BasicAuth fails when system time is wrong. #472

Morganamilo opened this issue Mar 15, 2022 · 0 comments
Labels
failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug.

Comments

@Morganamilo
Copy link

Morganamilo commented Mar 15, 2022

auth_integration_test.go:147:
Error Trace: auth_integration_test.go:147
Error: Received unexpected error:
want t=2022-03-15 09:34:19.096 +0000 GMT to be within [2022-03-15 09:34:35.331283375 +0000 GMT m=+1.020193292, 2022-03-15 09:34:37.694860921 +0000 GMT m=+3.383770835] time span
Test: TestAuth_TokenAuth
auth_integration_test.go:153:
Error Trace: auth_integration_test.go:153
Error: Received unexpected error:
want t=2022-03-15 10:34:19.096 +0000 GMT to be within [2022-03-15 10:34:35.331283375 +0000 GMT m=+3601.020193292, 2022-03-15 10:34:37.694860921 +0000 GMT m=+3603.383770835] time span
Test: TestAuth_TokenAuth

Essentially the test is checking the token's generation time is new by comparing it to time.Now() but the timestamp in the token is set to the server's time. So if the local time is wrong the assertion fails.

┆Issue is synchronized with this Jira Task by Unito

@AndyNicks AndyNicks added the failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug. label Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug.
Development

No branches or pull requests

2 participants