Closed aaronangxz closed 2 years ago
@preslavmihaylov I'm trying to run unit test TestAuthTokensCache
however i'm getting
program exited with an unexpected exit code: fork/exec ../todocheck: no such file or directory
and debugging shows "couldn't teardown test environment: failed to delete tokens cache ./...
Do you mind explaining what is wrong here? Do I need to do anything to set up test env? thanks!
You need to first build the todocheck
binary to run the tests.
If you run make test
instead of manual go test ...
it should work.
Anyways, it seems your tests pass because I ran them myself & they also pass on CI.
Do you mind creating another test which verifies that the token from env overrides the auth tokens cache? You might have to extend the testing framework a bit to support that assertion.
@preslavmihaylov Great, I managed to run the tests now! However, I might be overlooking some stuff here, you can let me know if the unit test is not sufficient
Since it's WIP, I won't merge it yet. Let me know if you're finished
Marked as ready, thanks! @preslavmihaylov
Fixes #175