From 8ed1104fc6d8a5738fd2341d0508c6fdc3c0c03c Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Tue, 11 Jul 2023 12:53:48 -0700 Subject: [PATCH] BATS: Replace `using_npm_run_dev` with `using_dev_mode` BATS: Update `using_dev` to `using_dev_mode` Signed-off-by: Phillip Rak --- bats/tests/helpers/defaults.bash | 8 ++++---- bats/tests/helpers/paths.bash | 2 +- bats/tests/helpers/vm.bash | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bats/tests/helpers/defaults.bash b/bats/tests/helpers/defaults.bash index 698a9919490..b227d61093b 100644 --- a/bats/tests/helpers/defaults.bash +++ b/bats/tests/helpers/defaults.bash @@ -150,13 +150,13 @@ validate_enum RD_9P_SECURITY_MODEL passthrough mapped-xattr mapped-file none # system: default system-wide install location shared for all users # user: per-user install location # dist: use the result of `yarn package` in ../dist -# npm: dev mode; start app with `cd ..; yarn dev` +# dev: dev mode; start app with `cd ..; yarn dev` # "": use first location from the list above that contains the app : "${RD_LOCATION:=}" -validate_enum RD_LOCATION system user dist npm "" +validate_enum RD_LOCATION system user dist dev "" -using_npm_run_dev() { - [ "$RD_LOCATION" = "npm" ] +using_dev_mode() { + [ "$RD_LOCATION" = "dev" ] } diff --git a/bats/tests/helpers/paths.bash b/bats/tests/helpers/paths.bash index 4d1d4d81b6f..ac1efaccf8a 100644 --- a/bats/tests/helpers/paths.bash +++ b/bats/tests/helpers/paths.bash @@ -32,7 +32,7 @@ set_path_resources() { exit 1 fi fi - if using_npm_run_dev; then + if using_dev_mode; then if is_windows; then fatal "npm operation not yet implemented for Windows" fi diff --git a/bats/tests/helpers/vm.bash b/bats/tests/helpers/vm.bash index 1625a5716a8..812d8ca0bca 100644 --- a/bats/tests/helpers/vm.bash +++ b/bats/tests/helpers/vm.bash @@ -22,7 +22,7 @@ factory_reset() { capture_logs fi - if using_npm_run_dev; then + if using_dev_mode; then if is_unix; then run rdctl shutdown run pkill_by_path "$PATH_REPO_ROOT/node_modules" @@ -133,7 +133,7 @@ start_container_engine() { EOF fi - if using_npm_run_dev; then + if using_dev_mode; then # translate args back into the internal API format local api_args=() for arg in "${args[@]}"; do