-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port(turborepo): Fixing API Client config tests (#6356)
### Description Changed our tests to use turbo info instead of `--_test-run`, which is specific to how we execute the Go binary. ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> Closes TURBO-1579 Co-authored-by: nicholaslyang <Nicholas Yang>
- Loading branch information
1 parent
285bc68
commit be8573d
Showing
5 changed files
with
172 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Setup | ||
$ . ${TESTDIR}/../../helpers/setup.sh | ||
$ . ${TESTDIR}/_helpers/setup_monorepo.sh $(pwd) | ||
|
||
Run test run | ||
$ ${TURBO} info --json | jq .config | ||
{ | ||
"apiUrl": null, | ||
"loginUrl": null, | ||
"teamSlug": null, | ||
"teamId": null, | ||
"token": null, | ||
"signature": null, | ||
"preflight": null, | ||
"timeout": null, | ||
"enabled": null | ||
} | ||
|
||
Run test run with api overloaded | ||
$ ${TURBO} info --json --api http://localhost:8000 | jq .config.apiUrl | ||
"http://localhost:8000" | ||
|
||
Run test run with token overloaded | ||
$ ${TURBO} info --json --token 1234567890 | jq .config.token | ||
"1234567890" | ||
|
||
Run test run with token overloaded from both TURBO_TOKEN and VERCEL_ARTIFACTS_TOKEN | ||
$ TURBO_TOKEN=turbo VERCEL_ARTIFACTS_TOKEN=vercel ${TURBO} info --json | jq .config.token | ||
"vercel" | ||
|
||
Run test run with team overloaded | ||
$ ${TURBO} info --json --team vercel | jq .config.teamSlug | ||
"vercel" | ||
|
||
Run test run with team overloaded from both env and flag (flag should take precedence) | ||
$ TURBO_TEAM=vercel ${TURBO} info --json --team turbo | jq .config.teamSlug | ||
"turbo" | ||
|
||
Run test run with remote cache timeout env variable set | ||
$ TURBO_REMOTE_CACHE_TIMEOUT=123 ${TURBO} info --json | jq .config.timeout | ||
123 | ||
|
||
Run test run with remote cache timeout from both env and flag (flag should take precedence) | ||
$ TURBO_REMOTE_CACHE_TIMEOUT=123 ${TURBO} info --json --remote-cache-timeout 456 | jq .config.timeout | ||
456 |