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

Integration tests for XOAuth2 #43

Open
imartinezortiz opened this issue Nov 10, 2020 · 2 comments
Open

Integration tests for XOAuth2 #43

imartinezortiz opened this issue Nov 10, 2020 · 2 comments

Comments

@imartinezortiz
Copy link
Contributor

Hi, although during the development I realized that the refresh_token is the only relevant secret regarding the XOAuth2 authentication, I just verified that I could run ./integration-test.sh xoauth2 with the token file that I had since last week. So I think that you can enable integration tests by:

  1. Login once with the testing account to obtain refresh_token and access_token
  2. Store these secrets as github secrets.
  3. Generate the .env with using the stored secrets to initialize XOAUTH2_INITIAL_ACCESS_TOKEN and XOAUTH2_INITIAL_REFRESH_TOKEN.

Although in a proper installation these variables are only used once to initialize the internal token database, seems that the XOAuth2 library can refresh the access_token without problem.

@bokysan
Copy link
Owner

bokysan commented Nov 12, 2020

Lovely, I'll check.

What I did initially (and didn't work):

  • get RT and AC
  • run tests (ok)
  • wait a bit over an hour
  • run the tests again (tests failed this time)

I haven't explored further, but you might be right -- I'll check.

@imartinezortiz
Copy link
Contributor Author

Yesterday I setup (with the same secrets) a instance of the latest container in a different machine and it worked. The only thing it is that I have enabled 2FA for that account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants