Suggest use PrismaClouApi
object instead of global pc_api
variable which cause circle-ci or github actions to fail
#153
Labels
documentation
Improvements or additions to documentation
First of all: thanks for this SDK.
Documentation link
README.md and all scripts examples use
pc_api
which is instantiate internally.Describe the problem
We use this SDK in our project, and use circle-ci and github actions to perform lint, tests and build.
One of ours tests check authentication failure. In your SDK, it raises a
SystemExit
and the test do not catch the expected exception.Our code was as below:
our test:
The error on both circle-ci and GHA:
So the test expect an Exception which he doesn't get.
ℹ️ locally the tests run fine. Tests on circle-ic and GHA are run differently it seems...
This is potentially due to the use of
pc_api
as global variable.Suggested fix
Suggest to use the following, if user is developing something more complex than a simple script if it's supposed to be tested on circle-ci and/or GHA:
It will save some time to find why this is failing =)
The text was updated successfully, but these errors were encountered: