Made additional Customer fields optional for compatibility with the sandbox environment#302
Conversation
|
Not sure why the tests are failing here, they all passed a little while ago in my repository? |
See here: http://github.com/tastyware/tastytrade?tab=contributing-ov-file tests don't use my credentials for safety |
|
I did enter them in my repository, do you need them to be added to your repository? |
|
These are the instructions I got from the github system regarding the issue with accessing my secrets. Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate. The job failed because all tests that require API interaction returned the error: {'error_code': 'invalid_grant', 'error_description': 'Invalid JWT'}. This indicates the JWT credentials used during testing are invalid or expired. Solution: Example credential refresh (in GitHub): After updating your credentials, re-run the workflow. This should resolve the “invalid_grant”/“Invalid JWT” errors. In my repository maneum1/tastytrade I have set those secrets, but on the repository tastyware/tastytrade where the tests are run as part of the pull request it appears my secrets are not reachable I understand the issue now. When you create a pull request from your fork (maneum1/tastytrade) to the upstream repository (tastyware/tastytrade), GitHub Actions runs the workflow on the upstream repository (tastyware/tastytrade), not your fork. The Problem: Solutions: YAML
The most secure and recommended approach is option 1 - have the upstream repository maintainers add the appropriate sandbox/test credentials as secrets. |
|
Thanks! |
|
Hi @Graeme22 , thanks for accepting my pull request, I'd still though like to understand why my tests did not go through. As you can see I'm not yet experienced with the github system, creating proper pull request, perform proper test, ... Any advise I'd really appreciate. Following your instructions I learned already a lot about the testing system, Thanks |
You actually did it correctly, tests are supposed to run in your fork with your credentials |
Description
Related issue(s)
Fixes ...
Pre-merge checklist
make lint)make test, make sure you haveTT_REFRESH,TT_SECRET, andTT_ACCOUNTenvironment variables set)Please note that, in order to pass the tests, you'll need to set up your Tastytrade credentials as repository secrets on your local fork. Read more at CONTRIBUTING.md.
Made some variables in the Customer class optional to be compatible with tastytrades sandbox environment.