From 4138dc9c28d119cb0a61d73ce2df3b906bd49329 Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Sun, 7 Jul 2024 00:12:11 -0500 Subject: [PATCH] Add test for warning when teams and user requests are both disabled --- test/Makefile | 4 +--- test/config-command/no-request-warning/expected | 2 ++ test/config-command/no-request-warning/run | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 test/config-command/no-request-warning/expected create mode 100644 test/config-command/no-request-warning/run diff --git a/test/Makefile b/test/Makefile index 8bebe30..6be0ac6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -13,9 +13,7 @@ build/exec/test: $(IDR_SOURCES) export harmony test: build/exec/test - cp config-command/harmony.json harmony.json.bak && \ - build/exec/test runtests $(INTERACTIVE) && \ - mv harmony.json.bak config-command/harmony.json + build/exec/test runtests $(INTERACTIVE) clean: rm -rf ./test/build diff --git a/test/config-command/no-request-warning/expected b/test/config-command/no-request-warning/expected new file mode 100644 index 0000000..fe89ffc --- /dev/null +++ b/test/config-command/no-request-warning/expected @@ -0,0 +1,2 @@ +`requestUsers` and `requestTeams` are both False. This means `harmony request` commands will only ever request reviews from users that are specified with the `+` syntax. More commonly, you want Harmony to at least request review for either a team or a user from a team when you say `harmony request teamname`; It's suggested to either `harmony config requestUsers true` or `harmony config requestTeams true` (or both). + diff --git a/test/config-command/no-request-warning/run b/test/config-command/no-request-warning/run new file mode 100644 index 0000000..e4437d2 --- /dev/null +++ b/test/config-command/no-request-warning/run @@ -0,0 +1,6 @@ +. ../../setup.sh +. ../setup.sh + +${harmony} config requestTeams no + +. ../cleanup.sh