diff --git a/hooks/component-valididate/check b/hooks/domain-component-valididate/check similarity index 100% rename from hooks/component-valididate/check rename to hooks/domain-component-valididate/check diff --git a/hooks/component-valididate/fixtures/bad-component.tf b/hooks/domain-component-valididate/fixtures/bad-component.tf similarity index 100% rename from hooks/component-valididate/fixtures/bad-component.tf rename to hooks/domain-component-valididate/fixtures/bad-component.tf diff --git a/hooks/component-valididate/fixtures/bad-folder/main.tf b/hooks/domain-component-valididate/fixtures/bad-folder/main.tf similarity index 100% rename from hooks/component-valididate/fixtures/bad-folder/main.tf rename to hooks/domain-component-valididate/fixtures/bad-folder/main.tf diff --git a/hooks/component-valididate/fixtures/bad-foo-bar.tf b/hooks/domain-component-valididate/fixtures/bad-foo-bar.tf similarity index 100% rename from hooks/component-valididate/fixtures/bad-foo-bar.tf rename to hooks/domain-component-valididate/fixtures/bad-foo-bar.tf diff --git a/hooks/component-valididate/fixtures/good-component/main.tf b/hooks/domain-component-valididate/fixtures/good-component/main.tf similarity index 100% rename from hooks/component-valididate/fixtures/good-component/main.tf rename to hooks/domain-component-valididate/fixtures/good-component/main.tf diff --git a/hooks/component-valididate/fixtures/good-foo-bar.tf b/hooks/domain-component-valididate/fixtures/good-foo-bar.tf similarity index 100% rename from hooks/component-valididate/fixtures/good-foo-bar.tf rename to hooks/domain-component-valididate/fixtures/good-foo-bar.tf diff --git a/hooks/component-valididate/test b/hooks/domain-component-valididate/test similarity index 100% rename from hooks/component-valididate/test rename to hooks/domain-component-valididate/test diff --git a/script/test b/script/test index 01c8e87..e9996a9 100755 --- a/script/test +++ b/script/test @@ -2,5 +2,10 @@ REPO_DIR="$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)")" -"$REPO_DIR/hooks/outputs-in-outputs-files/test" -"$REPO_DIR/hooks/vars-in-variables-files/test" +# Find all files in the hooks directory and its subdirectories +find "$REPO_DIR/hooks" -type f | while read -r file; do + # If the file is a test script, execute it + if [[ "$file" == *"/test" ]]; then + "$file" + fi +done