diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5912db9..617f5e2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -26,16 +26,8 @@ jobs: - name: Terraform init (v${{matrix.terraform_version}}) run: | - for i in $(find . -name tests -exec dirname {} \;); do - echo "Running tests for: \"$i\"" - terraform -chdir="$i" init - echo; - done + terraform init - name: Run Tests run: | - for i in $(find . -name tests -exec dirname {} \;); do - echo "Running tests for: \"$i\"" - terraform -chdir="$i" test - echo; - done + terraform test diff --git a/CustomResourceDefinition/v1alpha1/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1.tftest.hcl similarity index 87% rename from CustomResourceDefinition/v1alpha1/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1.tftest.hcl index 397ede3..d149768 100644 --- a/CustomResourceDefinition/v1alpha1/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1.tftest.hcl @@ -1,5 +1,8 @@ run "missing_group" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/" + } variables { path = "." @@ -18,6 +21,9 @@ run "missing_group" { run "missing_kind" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/" + } variables { path = "." @@ -38,6 +44,9 @@ run "missing_kind" { run "missing_versions" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/" + } variables { path = "." @@ -59,6 +68,9 @@ run "missing_versions" { run "with_invalid_versions" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/" + } variables { path = "." @@ -82,6 +94,9 @@ run "with_invalid_versions" { run "with_valid_versions" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/" + } variables { path = "." diff --git a/CustomResourceDefinition/v1alpha1/array/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_array.tftest.hcl similarity index 88% rename from CustomResourceDefinition/v1alpha1/array/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_array.tftest.hcl index 4408488..25c4c1b 100644 --- a/CustomResourceDefinition/v1alpha1/array/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_array.tftest.hcl @@ -1,5 +1,8 @@ run "without_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -17,6 +20,9 @@ run "without_items" { run "without_minItems_and_maxItems_and_with_bool_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -51,6 +57,9 @@ run "without_minItems_and_maxItems_and_with_bool_items" { run "without_minItems_and_maxItems_and_with_string_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -89,6 +98,9 @@ run "without_minItems_and_maxItems_and_with_string_items" { run "without_minItems_and_maxItems_and_with_integer_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -127,6 +139,9 @@ run "without_minItems_and_maxItems_and_with_integer_items" { run "without_minItems_and_maxItems_and_with_reduced_object_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -177,6 +192,9 @@ run "without_minItems_and_maxItems_and_with_reduced_object_items" { run "with_minItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -212,6 +230,9 @@ run "with_minItems" { run "with_minLength_and_maxItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -248,6 +269,9 @@ run "with_minLength_and_maxItems" { run "with_invalid_minItems_and_maxItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -270,6 +294,9 @@ run "with_invalid_minItems_and_maxItems" { run "with_string_minItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -291,6 +318,9 @@ run "with_string_minItems" { run "with_string_maxItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -312,6 +342,9 @@ run "with_string_maxItems" { run "with_invalid_minItems_value" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" @@ -333,6 +366,9 @@ run "with_invalid_minItems_value" { run "with_invalid_maxItems_value" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/array/" + } variables { metadata_name = "test" diff --git a/CustomResourceDefinition/v1alpha1/integer/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl similarity index 84% rename from CustomResourceDefinition/v1alpha1/integer/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl index 89b26aa..1fa42ee 100644 --- a/CustomResourceDefinition/v1alpha1/integer/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl @@ -1,5 +1,8 @@ run "without_minimum_and_maximum" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/integer" + } variables { metadata_name = "test" @@ -26,6 +29,9 @@ run "without_minimum_and_maximum" { run "with_minimum" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/integer" + } variables { metadata_name = "test" @@ -53,6 +59,9 @@ run "with_minimum" { run "with_minimum_and_maximum" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/integer" + } variables { metadata_name = "test" @@ -81,6 +90,9 @@ run "with_minimum_and_maximum" { run "with_invalid_minimum_and_maximum" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/integer" + } variables { metadata_name = "test" @@ -100,6 +112,9 @@ run "with_invalid_minimum_and_maximum" { run "with_string_minimum" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/integer" + } variables { metadata_name = "test" @@ -118,6 +133,9 @@ run "with_string_minimum" { run "with_string_maximum" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/integer" + } variables { metadata_name = "test" diff --git a/CustomResourceDefinition/v1alpha1/object/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_object.tftest.hcl similarity index 91% rename from CustomResourceDefinition/v1alpha1/object/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_object.tftest.hcl index cc1deed..9532849 100644 --- a/CustomResourceDefinition/v1alpha1/object/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_object.tftest.hcl @@ -1,5 +1,8 @@ run "without_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/object" + } variables { metadata_name = "test" @@ -17,6 +20,9 @@ run "without_properties" { run "with_invalid_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/object" + } variables { metadata_name = "test" @@ -35,6 +41,9 @@ run "with_invalid_properties" { run "with_properties_missing_type" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/object" + } variables { metadata_name = "test" @@ -55,6 +64,9 @@ run "with_properties_missing_type" { run "with_properties_invalid_type" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/object" + } variables { metadata_name = "test" @@ -77,6 +89,9 @@ run "with_properties_invalid_type" { run "with_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/object" + } variables { metadata_name = "test" diff --git a/CustomResourceDefinition/v1alpha1/reduced_array/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_reduced_array.tftest.hcl similarity index 86% rename from CustomResourceDefinition/v1alpha1/reduced_array/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_reduced_array.tftest.hcl index 8b3260f..6ccbb62 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_array/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_reduced_array.tftest.hcl @@ -1,5 +1,8 @@ run "without_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -17,6 +20,9 @@ run "without_items" { run "without_minItems_and_maxItems_and_with_bool_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -51,6 +57,9 @@ run "without_minItems_and_maxItems_and_with_bool_items" { run "without_minItems_and_maxItems_and_with_string_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -89,6 +98,9 @@ run "without_minItems_and_maxItems_and_with_string_items" { run "without_minItems_and_maxItems_and_with_integer_items" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -127,6 +139,9 @@ run "without_minItems_and_maxItems_and_with_integer_items" { run "with_minItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -162,6 +177,9 @@ run "with_minItems" { run "with_minLength_and_maxItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -198,6 +216,9 @@ run "with_minLength_and_maxItems" { run "with_invalid_minItems_and_maxItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -220,6 +241,9 @@ run "with_invalid_minItems_and_maxItems" { run "with_string_minItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -241,6 +265,9 @@ run "with_string_minItems" { run "with_string_maxItems" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -262,6 +289,9 @@ run "with_string_maxItems" { run "with_invalid_minItems_value" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" @@ -283,6 +313,9 @@ run "with_invalid_minItems_value" { run "with_invalid_maxItems_value" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_array" + } variables { metadata_name = "test" diff --git a/CustomResourceDefinition/v1alpha1/reduced_object/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_reduced_object.tftest.hcl similarity index 88% rename from CustomResourceDefinition/v1alpha1/reduced_object/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_reduced_object.tftest.hcl index 9e4b247..133e014 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_object/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_reduced_object.tftest.hcl @@ -1,5 +1,8 @@ run "without_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_object/" + } variables { metadata_name = "test" @@ -17,6 +20,9 @@ run "without_properties" { run "with_invalid_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_object/" + } variables { metadata_name = "test" @@ -35,6 +41,9 @@ run "with_invalid_properties" { run "with_properties_missing_type" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_object/" + } variables { metadata_name = "test" @@ -55,6 +64,9 @@ run "with_properties_missing_type" { run "with_properties_invalid_type" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_object/" + } variables { metadata_name = "test" @@ -77,6 +89,9 @@ run "with_properties_invalid_type" { run "with_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/reduced_object/" + } variables { metadata_name = "test" diff --git a/CustomResourceDefinition/v1alpha1/root_object/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_root_object.tftest.hcl similarity index 90% rename from CustomResourceDefinition/v1alpha1/root_object/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_root_object.tftest.hcl index e1659c1..6a8d946 100644 --- a/CustomResourceDefinition/v1alpha1/root_object/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_root_object.tftest.hcl @@ -1,5 +1,8 @@ run "without_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/root_object/" + } variables { metadata_name = "test" @@ -17,6 +20,9 @@ run "without_properties" { run "with_invalid_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/root_object/" + } variables { metadata_name = "test" @@ -35,6 +41,9 @@ run "with_invalid_properties" { run "with_properties_missing_type" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/root_object/" + } variables { metadata_name = "test" @@ -55,6 +64,9 @@ run "with_properties_missing_type" { run "with_properties_invalid_type" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/root_object/" + } variables { metadata_name = "test" @@ -77,6 +89,9 @@ run "with_properties_invalid_type" { run "with_properties" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/root_object/" + } variables { metadata_name = "test" diff --git a/CustomResourceDefinition/v1alpha1/string/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_string.tftest.hcl similarity index 84% rename from CustomResourceDefinition/v1alpha1/string/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_string.tftest.hcl index f1f2347..7722054 100644 --- a/CustomResourceDefinition/v1alpha1/string/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_string.tftest.hcl @@ -1,5 +1,8 @@ run "without_minLength_and_maxLength" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" @@ -26,6 +29,9 @@ run "without_minLength_and_maxLength" { run "with_minLength" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" @@ -53,6 +59,9 @@ run "with_minLength" { run "with_minLength_and_maxLength" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" @@ -81,6 +90,9 @@ run "with_minLength_and_maxLength" { run "with_invalid_minLength_and_maxLength" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" @@ -100,6 +112,9 @@ run "with_invalid_minLength_and_maxLength" { run "with_string_minLength" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" @@ -118,6 +133,9 @@ run "with_string_minLength" { run "with_string_maxLength" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" @@ -136,6 +154,9 @@ run "with_string_maxLength" { run "with_invalid_minLength_value" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" @@ -154,6 +175,9 @@ run "with_invalid_minLength_value" { run "with_invalid_maxLength_value" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/string" + } variables { metadata_name = "test" diff --git a/CustomResourceDefinition/v1alpha1/version/tests/unit.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_version.tftest.hcl similarity index 85% rename from CustomResourceDefinition/v1alpha1/version/tests/unit.tftest.hcl rename to tests/CustomResourceDefinition_v1alpha1_version.tftest.hcl index d7d7e87..a472fd0 100644 --- a/CustomResourceDefinition/v1alpha1/version/tests/unit.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_version.tftest.hcl @@ -1,5 +1,8 @@ run "missing_name" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/version/" + } variables { metadata_name = "test" @@ -15,6 +18,9 @@ run "missing_name" { run "missing_specSchema" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/version/" + } variables { metadata_name = "test" @@ -32,6 +38,9 @@ run "missing_specSchema" { run "with_specSchema" { command = plan + module { + source = "./CustomResourceDefinition/v1alpha1/version/" + } variables { metadata_name = "test" diff --git a/manifestValidation/tests/unit.tftest.hcl b/tests/manifestValidation.tftest.hcl similarity index 82% rename from manifestValidation/tests/unit.tftest.hcl rename to tests/manifestValidation.tftest.hcl index 747211c..004aa7a 100644 --- a/manifestValidation/tests/unit.tftest.hcl +++ b/tests/manifestValidation.tftest.hcl @@ -1,5 +1,8 @@ run "with_invalid_yaml" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." @@ -13,6 +16,9 @@ run "with_invalid_yaml" { run "missing_apiVersion" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." @@ -26,6 +32,9 @@ run "missing_apiVersion" { run "invalid_apiVersion" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." @@ -41,6 +50,9 @@ run "invalid_apiVersion" { run "missing_kind" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." @@ -56,6 +68,9 @@ run "missing_kind" { run "missing_metadata" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." @@ -72,6 +87,9 @@ run "missing_metadata" { run "missing_metadata_name" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." @@ -89,6 +107,9 @@ run "missing_metadata_name" { run "missing_spec" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." @@ -107,6 +128,9 @@ run "missing_spec" { run "with_valid_manifest" { command = plan + module { + source = "./manifestValidation/" + } variables { path = "." diff --git a/resourceValidation/tests/unit.tftest.hcl b/tests/resourceValidation.tftest.hcl similarity index 96% rename from resourceValidation/tests/unit.tftest.hcl rename to tests/resourceValidation.tftest.hcl index da75696..eb42480 100644 --- a/resourceValidation/tests/unit.tftest.hcl +++ b/tests/resourceValidation.tftest.hcl @@ -1,5 +1,8 @@ run "duplicated_custom_resource_definition" { command = plan + module { + source = "./resourceValidation/" + } variables { path = "." @@ -82,6 +85,9 @@ run "duplicated_custom_resource_definition" { run "custom_resource_definition_not_found" { command = plan + module { + source = "./resourceValidation/" + } variables { path = "." @@ -135,6 +141,9 @@ run "custom_resource_definition_not_found" { run "kind_not_found" { command = plan + module { + source = "./resourceValidation/" + } variables { path = "." @@ -188,6 +197,9 @@ run "kind_not_found" { run "disabled_version" { command = plan + module { + source = "./resourceValidation/" + } variables { path = "." @@ -241,6 +253,9 @@ run "disabled_version" { run "deprecated_version" { command = plan + module { + source = "./resourceValidation/" + } variables { path = "." @@ -294,6 +309,9 @@ run "deprecated_version" { run "success" { command = plan + module { + source = "./resourceValidation/" + } variables { path = "." diff --git a/schemaValidation/array/v0/tests/unit.tftest.hcl b/tests/schemaValidation_array_v0.tftest.hcl similarity index 91% rename from schemaValidation/array/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_array_v0.tftest.hcl index accfd6d..011f36d 100644 --- a/schemaValidation/array/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_array_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/array/v0/" + } variables { metadata_name = "test" @@ -32,6 +35,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/array/v0/" + } variables { metadata_name = "test" @@ -64,6 +70,9 @@ run "with_invalid_value" { run "with_wrong_minItems" { command = plan + module { + source = "./schemaValidation/array/v0/" + } variables { metadata_name = "test" @@ -96,6 +105,9 @@ run "with_wrong_minItems" { run "with_wrong_maxItems" { command = plan + module { + source = "./schemaValidation/array/v0/" + } variables { metadata_name = "test" @@ -128,6 +140,9 @@ run "with_wrong_maxItems" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/array/v0/" + } variables { metadata_name = "test" diff --git a/schemaValidation/bool/v0/tests/unit.tftest.hcl b/tests/schemaValidation_bool_v0.tftest.hcl similarity index 86% rename from schemaValidation/bool/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_bool_v0.tftest.hcl index 4878973..c9607c1 100644 --- a/schemaValidation/bool/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_bool_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/bool/v0/" + } variables { metadata_name = "test" @@ -21,6 +24,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/bool/v0/" + } variables { metadata_name = "test" @@ -42,6 +48,9 @@ run "with_invalid_value" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/bool/v0/" + } variables { metadata_name = "test" diff --git a/schemaValidation/integer/v0/tests/unit.tftest.hcl b/tests/schemaValidation_integer_v0.tftest.hcl similarity index 86% rename from schemaValidation/integer/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_integer_v0.tftest.hcl index da6532e..74a5aa7 100644 --- a/schemaValidation/integer/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_integer_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/integer/v0/" + } variables { metadata_name = "test" @@ -24,6 +27,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/integer/v0/" + } variables { metadata_name = "test" @@ -48,6 +54,9 @@ run "with_invalid_value" { run "with_wrong_minLegnth" { command = plan + module { + source = "./schemaValidation/integer/v0/" + } variables { metadata_name = "test" @@ -72,6 +81,9 @@ run "with_wrong_minLegnth" { run "with_wrong_maxLegnth" { command = plan + module { + source = "./schemaValidation/integer/v0/" + } variables { metadata_name = "test" @@ -97,6 +109,9 @@ run "with_wrong_maxLegnth" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/integer/v0/" + } variables { metadata_name = "test" diff --git a/schemaValidation/object/v0/tests/unit.tftest.hcl b/tests/schemaValidation_object_v0.tftest.hcl similarity index 93% rename from schemaValidation/object/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_object_v0.tftest.hcl index e38ddb3..ce585ad 100644 --- a/schemaValidation/object/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_object_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/object/v0/" + } variables { metadata_name = "test" @@ -31,6 +34,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/object/v0/" + } variables { metadata_name = "test" @@ -62,6 +68,9 @@ run "with_invalid_value" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/object/v0/" + } variables { metadata_name = "test" diff --git a/schemaValidation/reduced_array/v0/tests/unit.tftest.hcl b/tests/schemaValidation_reduced_array_v0.tftest.hcl similarity index 89% rename from schemaValidation/reduced_array/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_reduced_array_v0.tftest.hcl index 3a55bb4..396a3ef 100644 --- a/schemaValidation/reduced_array/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_reduced_array_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/reduced_array/v0/" + } variables { metadata_name = "test" @@ -32,6 +35,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/reduced_array/v0/" + } variables { metadata_name = "test" @@ -64,6 +70,9 @@ run "with_invalid_value" { run "with_wrong_minItems" { command = plan + module { + source = "./schemaValidation/reduced_array/v0/" + } variables { metadata_name = "test" @@ -96,6 +105,9 @@ run "with_wrong_minItems" { run "with_wrong_maxItems" { command = plan + module { + source = "./schemaValidation/reduced_array/v0/" + } variables { metadata_name = "test" @@ -128,6 +140,9 @@ run "with_wrong_maxItems" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/reduced_array/v0/" + } variables { metadata_name = "test" diff --git a/schemaValidation/reduced_object/v0/tests/unit.tftest.hcl b/tests/schemaValidation_reduced_object_v0.tftest.hcl similarity index 91% rename from schemaValidation/reduced_object/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_reduced_object_v0.tftest.hcl index 64c5c8d..f36828c 100644 --- a/schemaValidation/reduced_object/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_reduced_object_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/reduced_object/v0/" + } variables { metadata_name = "test" @@ -31,6 +34,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/reduced_object/v0/" + } variables { metadata_name = "test" @@ -62,6 +68,9 @@ run "with_invalid_value" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/reduced_object/v0/" + } variables { metadata_name = "test" diff --git a/schemaValidation/root_object/v0/tests/unit.tftest.hcl b/tests/schemaValidation_root_object_v0.tftest.hcl similarity index 93% rename from schemaValidation/root_object/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_root_object_v0.tftest.hcl index b5315e6..0dea373 100644 --- a/schemaValidation/root_object/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_root_object_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/root_object/v0/" + } variables { metadata_name = "test" @@ -31,6 +34,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/root_object/v0/" + } variables { metadata_name = "test" @@ -62,6 +68,9 @@ run "with_invalid_value" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/root_object/v0/" + } variables { metadata_name = "test" diff --git a/schemaValidation/string/v0/tests/unit.tftest.hcl b/tests/schemaValidation_string_v0.tftest.hcl similarity index 87% rename from schemaValidation/string/v0/tests/unit.tftest.hcl rename to tests/schemaValidation_string_v0.tftest.hcl index 392d2c6..a88540e 100644 --- a/schemaValidation/string/v0/tests/unit.tftest.hcl +++ b/tests/schemaValidation_string_v0.tftest.hcl @@ -1,5 +1,8 @@ run "missing_value" { command = plan + module { + source = "./schemaValidation/string/v0/" + } variables { metadata_name = "test" @@ -24,6 +27,9 @@ run "missing_value" { run "with_invalid_value" { command = plan + module { + source = "./schemaValidation/string/v0/" + } variables { metadata_name = "test" @@ -48,6 +54,9 @@ run "with_invalid_value" { run "with_wrong_minLegnth" { command = plan + module { + source = "./schemaValidation/string/v0/" + } variables { metadata_name = "test" @@ -72,6 +81,9 @@ run "with_wrong_minLegnth" { run "with_wrong_maxLegnth" { command = plan + module { + source = "./schemaValidation/string/v0/" + } variables { metadata_name = "test" @@ -97,6 +109,9 @@ run "with_wrong_maxLegnth" { run "with_valid_value" { command = plan + module { + source = "./schemaValidation/string/v0/" + } variables { metadata_name = "test"