Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for passing correct config
- Loading branch information
1 parent
9334218
commit f625f4e
Showing
4 changed files
with
340 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,3 @@ impl<'a> TryFrom<&'a CommandBase> for ExecutionState<'a> { | |
}) | ||
} | ||
} | ||
|
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,333 @@ | ||
Setup | ||
$ . ${TESTDIR}/../../helpers/setup.sh | ||
$ . ${TESTDIR}/_helpers/setup_monorepo.sh $(pwd) | ||
|
||
Run test run | ||
$ ${TURBO} run build --__test-run | ||
Invoking go binary with { | ||
"remote_config": { | ||
"token": null, | ||
"team_id": null, | ||
"team_slug": null, | ||
"api_url": "https://vercel.com/api" | ||
}, | ||
"cli_args": { | ||
"version": false, | ||
"no_update_notifier": false, | ||
"api": null, | ||
"color": false, | ||
"cpu_profile": null, | ||
"cwd": ".*", (re) | ||
"heap": null, | ||
"login": null, | ||
"no_color": false, | ||
"preflight": false, | ||
"remote_cache_timeout": null, | ||
"team": null, | ||
"token": null, | ||
"trace": null, | ||
"verbosity": 0, | ||
"check_for_update": false, | ||
"test_run": true, | ||
"run_args": null, | ||
"command": { | ||
"Run": { | ||
"cache_dir": null, | ||
"cache_workers": 10, | ||
"concurrency": null, | ||
"continue_execution": false, | ||
"dry_run": null, | ||
"single_package": false, | ||
"filter": [], | ||
"force": false, | ||
"global_deps": [], | ||
"graph": null, | ||
"env_mode": "Infer", | ||
"ignore": [], | ||
"include_dependencies": false, | ||
"no_cache": false, | ||
"no_daemon": false, | ||
"no_deps": false, | ||
"output_logs": null, | ||
"only": false, | ||
"parallel": false, | ||
"pkg_inference_root": "", | ||
"profile": null, | ||
"remote_only": false, | ||
"scope": [], | ||
"since": null, | ||
"summarize": null, | ||
"log_prefix": null, | ||
"tasks": [ | ||
"build" | ||
], | ||
"pass_through_args": [], | ||
"experimental_space_id": null | ||
} | ||
} | ||
} | ||
} | ||
|
||
Run test run with api overloaded | ||
$ ${TURBO} run build --__test-run --api http://localhost:8000 | ||
Invoking go binary with { | ||
"remote_config": { | ||
"token": null, | ||
"team_id": null, | ||
"team_slug": null, | ||
"api_url": "http://localhost:8000" | ||
}, | ||
"cli_args": { | ||
"version": false, | ||
"no_update_notifier": false, | ||
"api": "http://localhost:8000", | ||
"color": false, | ||
"cpu_profile": null, | ||
"cwd": ".*", (re) | ||
"heap": null, | ||
"login": null, | ||
"no_color": false, | ||
"preflight": false, | ||
"remote_cache_timeout": null, | ||
"team": null, | ||
"token": null, | ||
"trace": null, | ||
"verbosity": 0, | ||
"check_for_update": false, | ||
"test_run": true, | ||
"run_args": null, | ||
"command": { | ||
"Run": { | ||
"cache_dir": null, | ||
"cache_workers": 10, | ||
"concurrency": null, | ||
"continue_execution": false, | ||
"dry_run": null, | ||
"single_package": false, | ||
"filter": [], | ||
"force": false, | ||
"global_deps": [], | ||
"graph": null, | ||
"env_mode": "Infer", | ||
"ignore": [], | ||
"include_dependencies": false, | ||
"no_cache": false, | ||
"no_daemon": false, | ||
"no_deps": false, | ||
"output_logs": null, | ||
"only": false, | ||
"parallel": false, | ||
"pkg_inference_root": "", | ||
"profile": null, | ||
"remote_only": false, | ||
"scope": [], | ||
"since": null, | ||
"summarize": null, | ||
"log_prefix": null, | ||
"tasks": [ | ||
"build" | ||
], | ||
"pass_through_args": [], | ||
"experimental_space_id": null | ||
} | ||
} | ||
} | ||
} | ||
|
||
Run test run with token overloaded | ||
$ ${TURBO} run build --__test-run --token 1234567890 | ||
Invoking go binary with { | ||
"remote_config": { | ||
"token": "1234567890", | ||
"team_id": null, | ||
"team_slug": null, | ||
"api_url": "https://vercel.com/api" | ||
}, | ||
"cli_args": { | ||
"version": false, | ||
"no_update_notifier": false, | ||
"api": null, | ||
"color": false, | ||
"cpu_profile": null, | ||
"cwd": ".*", (re) | ||
"heap": null, | ||
"login": null, | ||
"no_color": false, | ||
"preflight": false, | ||
"remote_cache_timeout": null, | ||
"team": null, | ||
"token": "1234567890", | ||
"trace": null, | ||
"verbosity": 0, | ||
"check_for_update": false, | ||
"test_run": true, | ||
"run_args": null, | ||
"command": { | ||
"Run": { | ||
"cache_dir": null, | ||
"cache_workers": 10, | ||
"concurrency": null, | ||
"continue_execution": false, | ||
"dry_run": null, | ||
"single_package": false, | ||
"filter": [], | ||
"force": false, | ||
"global_deps": [], | ||
"graph": null, | ||
"env_mode": "Infer", | ||
"ignore": [], | ||
"include_dependencies": false, | ||
"no_cache": false, | ||
"no_daemon": false, | ||
"no_deps": false, | ||
"output_logs": null, | ||
"only": false, | ||
"parallel": false, | ||
"pkg_inference_root": "", | ||
"profile": null, | ||
"remote_only": false, | ||
"scope": [], | ||
"since": null, | ||
"summarize": null, | ||
"log_prefix": null, | ||
"tasks": [ | ||
"build" | ||
], | ||
"pass_through_args": [], | ||
"experimental_space_id": null | ||
} | ||
} | ||
} | ||
} | ||
|
||
Run test run with team overloaded | ||
$ ${TURBO} run build --__test-run --team vercel | ||
Invoking go binary with { | ||
"remote_config": { | ||
"token": null, | ||
"team_id": null, | ||
"team_slug": "vercel", | ||
"api_url": "https://vercel.com/api" | ||
}, | ||
"cli_args": { | ||
"version": false, | ||
"no_update_notifier": false, | ||
"api": null, | ||
"color": false, | ||
"cpu_profile": null, | ||
"cwd": ".*", (re) | ||
"heap": null, | ||
"login": null, | ||
"no_color": false, | ||
"preflight": false, | ||
"remote_cache_timeout": null, | ||
"team": "vercel", | ||
"token": null, | ||
"trace": null, | ||
"verbosity": 0, | ||
"check_for_update": false, | ||
"test_run": true, | ||
"run_args": null, | ||
"command": { | ||
"Run": { | ||
"cache_dir": null, | ||
"cache_workers": 10, | ||
"concurrency": null, | ||
"continue_execution": false, | ||
"dry_run": null, | ||
"single_package": false, | ||
"filter": [], | ||
"force": false, | ||
"global_deps": [], | ||
"graph": null, | ||
"env_mode": "Infer", | ||
"ignore": [], | ||
"include_dependencies": false, | ||
"no_cache": false, | ||
"no_daemon": false, | ||
"no_deps": false, | ||
"output_logs": null, | ||
"only": false, | ||
"parallel": false, | ||
"pkg_inference_root": "", | ||
"profile": null, | ||
"remote_only": false, | ||
"scope": [], | ||
"since": null, | ||
"summarize": null, | ||
"log_prefix": null, | ||
"tasks": [ | ||
"build" | ||
], | ||
"pass_through_args": [], | ||
"experimental_space_id": null | ||
} | ||
} | ||
} | ||
} | ||
|
||
Run test run with team overloaded from both env and flag (flag should take precedence) | ||
$ TURBO_TEAM=vercel ${TURBO} run build --__test-run --team turbo | ||
Invoking go binary with { | ||
"remote_config": { | ||
"token": null, | ||
"team_id": null, | ||
"team_slug": "turbo", | ||
"api_url": "https://vercel.com/api" | ||
}, | ||
"cli_args": { | ||
"version": false, | ||
"no_update_notifier": false, | ||
"api": null, | ||
"color": false, | ||
"cpu_profile": null, | ||
"cwd": ".*", | ||
"heap": null, | ||
"login": null, | ||
"no_color": false, | ||
"preflight": false, | ||
"remote_cache_timeout": null, | ||
"team": "turbo", | ||
"token": null, | ||
"trace": null, | ||
"verbosity": 0, | ||
"check_for_update": false, | ||
"test_run": true, | ||
"run_args": null, | ||
"command": { | ||
"Run": { | ||
"cache_dir": null, | ||
"cache_workers": 10, | ||
"concurrency": null, | ||
"continue_execution": false, | ||
"dry_run": null, | ||
"single_package": false, | ||
"filter": [], | ||
"force": false, | ||
"global_deps": [], | ||
"graph": null, | ||
"env_mode": "Infer", | ||
"ignore": [], | ||
"include_dependencies": false, | ||
"no_cache": false, | ||
"no_daemon": false, | ||
"no_deps": false, | ||
"output_logs": null, | ||
"only": false, | ||
"parallel": false, | ||
"pkg_inference_root": "", | ||
"profile": null, | ||
"remote_only": false, | ||
"scope": [], | ||
"since": null, | ||
"summarize": null, | ||
"log_prefix": null, | ||
"tasks": [ | ||
"build" | ||
], | ||
"pass_through_args": [], | ||
"experimental_space_id": null | ||
} | ||
} | ||
} | ||
} |