Integration tests for XOAuth2
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:
- Login once with the testing account to obtain
refresh_tokenandaccess_token - Store these secrets as github secrets.
- Generate the
.envwith using the stored secrets to initializeXOAUTH2_INITIAL_ACCESS_TOKENandXOAUTH2_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.
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.
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.