From 657d2ee541b57142f4a3f6229c6043a8c4c0183f Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 15 Oct 2023 19:56:35 +0200 Subject: [PATCH 1/7] Rename folder --- .../tests/e2e/{default => defaults}/dependencies.bicep | 0 .../tests/e2e/{default => defaults}/main.test.bicep | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename avm/res/kubernetes-configuration/flux-configuration/tests/e2e/{default => defaults}/dependencies.bicep (100%) rename avm/res/kubernetes-configuration/flux-configuration/tests/e2e/{default => defaults}/main.test.bicep (100%) diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/default/dependencies.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/dependencies.bicep similarity index 100% rename from avm/res/kubernetes-configuration/flux-configuration/tests/e2e/default/dependencies.bicep rename to avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/dependencies.bicep diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/default/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep similarity index 100% rename from avm/res/kubernetes-configuration/flux-configuration/tests/e2e/default/main.test.bicep rename to avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep From f9e6b5d91ae854eb20fbff8838fa52ca4c96b67b Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 15 Oct 2023 19:59:18 +0200 Subject: [PATCH 2/7] Add tests unit placeholder --- .../flux-configuration/tests/unit/custom.tests.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 b/avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 new file mode 100644 index 0000000000..17893bc0fc --- /dev/null +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 @@ -0,0 +1,13 @@ +############################# +## Addition unit tests ## +############################# +## +## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. +## +########################################################## +## Addition unit tests ## +############################# +## +## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. +## +############################# \ No newline at end of file From 29998218ad5679fa1957f823b0ed0b5f16b9185f Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 15 Oct 2023 20:00:37 +0200 Subject: [PATCH 3/7] Rename to min and regen --- .../flux-configuration/README.md | 10 +++++----- .../tests/e2e/defaults/main.test.bicep | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/avm/res/kubernetes-configuration/flux-configuration/README.md b/avm/res/kubernetes-configuration/flux-configuration/README.md index 96b93f023a..d672a2c4b6 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/README.md +++ b/avm/res/kubernetes-configuration/flux-configuration/README.md @@ -26,11 +26,11 @@ The following module usage examples are retrieved from the content of the files >**Note**: To reference the module, please use the following syntax `br/public:avm-res-kubernetesconfiguration-fluxconfiguration:1.0.0`. -- [Default](#example-1-default) +- [Defaults](#example-1-defaults) - [Max](#example-2-max) - [Waf-Aligned](#example-3-waf-aligned) -### Example 1: _Default_ +### Example 1: _Defaults_
@@ -38,11 +38,11 @@ The following module usage examples are retrieved from the content of the files ```bicep module fluxConfiguration 'br/public:avm-res-kubernetesconfiguration-fluxconfiguration:1.0.0' = { - name: '${uniqueString(deployment().name, location)}-test-kcfcdef' + name: '${uniqueString(deployment().name, location)}-test-kcfcmin' params: { // Required parameters clusterName: '' - name: 'kcfcdef001' + name: 'kcfcmin001' namespace: 'flux-system' sourceKind: 'GitRepository' // Non-required parameters @@ -80,7 +80,7 @@ module fluxConfiguration 'br/public:avm-res-kubernetesconfiguration-fluxconfigur "value": "" }, "name": { - "value": "kcfcdef001" + "value": "kcfcmin001" }, "namespace": { "value": "flux-system" diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep index 42dfa00f52..ddc75747d8 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.flux param location string = deployment().location @description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') -param serviceShort string = 'kcfcdef' +param serviceShort string = 'kcfcmin' @description('Optional. A token to inject into the name of each resource.') param namePrefix string = '#_namePrefix_#' From 73b2485fbad37d9b7dac7ef64f738963e1b80e88 Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 15 Oct 2023 20:06:17 +0200 Subject: [PATCH 4/7] example metadata --- .../flux-configuration/README.md | 23 ++++++++++++++----- .../tests/e2e/defaults/main.test.bicep | 6 +++++ .../tests/e2e/max/main.test.bicep | 3 +++ .../tests/e2e/waf-aligned/main.test.bicep | 3 +++ 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/avm/res/kubernetes-configuration/flux-configuration/README.md b/avm/res/kubernetes-configuration/flux-configuration/README.md index d672a2c4b6..36f2384fda 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/README.md +++ b/avm/res/kubernetes-configuration/flux-configuration/README.md @@ -26,11 +26,16 @@ The following module usage examples are retrieved from the content of the files >**Note**: To reference the module, please use the following syntax `br/public:avm-res-kubernetesconfiguration-fluxconfiguration:1.0.0`. -- [Defaults](#example-1-defaults) -- [Max](#example-2-max) -- [Waf-Aligned](#example-3-waf-aligned) +- [Using only defaults](#example-1-using-only-defaults) +- [Using large parameter set](#example-2-using-large-parameter-set) +- [WAF-aligned](#example-3-waf-aligned) + +### Example 1: _Using only defaults_ + +This instance deploys the module with the minimum set of required parameters. +> **Note:** The test currently implements additional non-required parameters to cater for a test-specific limitation. + -### Example 1: _Defaults_
@@ -119,7 +124,10 @@ module fluxConfiguration 'br/public:avm-res-kubernetesconfiguration-fluxconfigur

-### Example 2: _Max_ +### Example 2: _Using large parameter set_ + +This instance deploys the module with most of its features enabled. +

@@ -226,7 +234,10 @@ module fluxConfiguration 'br/public:avm-res-kubernetesconfiguration-fluxconfigur

-### Example 3: _Waf-Aligned_ +### Example 3: _WAF-aligned_ + +This instance deploys the module in alignment with the best-pratices of the Azure Well-Architected Framework. +

diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep index ddc75747d8..013da2b3f6 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep @@ -1,5 +1,11 @@ targetScope = 'subscription' +metadata name = 'Using only defaults' +metadata description = ''' +This instance deploys the module with the minimum set of required parameters. +> **Note:** The test currently implements additional non-required parameters to cater for a test-specific limitation. +''' + // ========== // // Parameters // // ========== // diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep index 4889110dfb..6a8b585bb3 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep @@ -1,5 +1,8 @@ targetScope = 'subscription' +metadata name = 'Using large parameter set' +metadata description = 'This instance deploys the module with most of its features enabled.' + // ========== // // Parameters // // ========== // diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep index 4a5f7cdd19..f5f5932342 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep @@ -1,5 +1,8 @@ targetScope = 'subscription' +metadata name = 'WAF-aligned' +metadata description = 'This instance deploys the module in alignment with the best-pratices of the Azure Well-Architected Framework.' + // ========== // // Parameters // // ========== // From aca41dbc5a9c0eb3ca215114c6656e8bab27262c Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 15 Oct 2023 20:16:24 +0200 Subject: [PATCH 5/7] new line --- .../network/public-ip-address/tests/e2e/defaults/main.test.bicep | 1 + 1 file changed, 1 insertion(+) diff --git a/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep b/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep index b5cb2687f8..5aa3af3d8d 100644 --- a/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep @@ -1,4 +1,5 @@ targetScope = 'subscription' + metadata name = 'Using only defaults' metadata description = 'This instance deploys the module with the minimum set of required parameters.' From 565b2bb2f256a94bc49e2e1715c14c83a8a6102b Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 15 Oct 2023 20:26:44 +0200 Subject: [PATCH 6/7] new line revert --- .../network/public-ip-address/tests/e2e/defaults/main.test.bicep | 1 - 1 file changed, 1 deletion(-) diff --git a/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep b/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep index 5aa3af3d8d..b5cb2687f8 100644 --- a/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep @@ -1,5 +1,4 @@ targetScope = 'subscription' - metadata name = 'Using only defaults' metadata description = 'This instance deploys the module with the minimum set of required parameters.' From d6f688988000b19483db5dc5e11ee44a43047178 Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 22 Oct 2023 18:05:13 +0200 Subject: [PATCH 7/7] add tests unit placeholder where missing --- .../account/tests/unit/custom.tests.ps1 | 10 +++++----- .../ssh-public-key/tests/unit/custom.tests.ps1 | 7 +++++++ .../action-group/tests/unit/custom.tests.ps1 | 7 +++++++ .../key-vault/vault/tests/unit/custom.tests.ps1 | 16 +++++----------- .../extension/tests/unit/custom.tests.ps1 | 7 +++++++ .../tests/unit/custom.tests.ps1 | 16 +++++----------- .../dns-resolver/tests/unit/custom.tests.ps1 | 7 +++++++ .../private-endpoint/tests/unit/custom.tests.ps1 | 16 +++++----------- .../tests/unit/custom.tests.ps1 | 16 +++++----------- 9 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 avm/res/compute/ssh-public-key/tests/unit/custom.tests.ps1 create mode 100644 avm/res/insights/action-group/tests/unit/custom.tests.ps1 create mode 100644 avm/res/kubernetes-configuration/extension/tests/unit/custom.tests.ps1 create mode 100644 avm/res/network/dns-resolver/tests/unit/custom.tests.ps1 diff --git a/avm/res/cognitive-services/account/tests/unit/custom.tests.ps1 b/avm/res/cognitive-services/account/tests/unit/custom.tests.ps1 index 649bfe5cf3..7b6a615b7b 100644 --- a/avm/res/cognitive-services/account/tests/unit/custom.tests.ps1 +++ b/avm/res/cognitive-services/account/tests/unit/custom.tests.ps1 @@ -1,7 +1,7 @@ -############################# -## Addition unit tests ## -############################# +########################### +## Additional unit tests ## +########################### ## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. ## -############################# \ No newline at end of file +########################### \ No newline at end of file diff --git a/avm/res/compute/ssh-public-key/tests/unit/custom.tests.ps1 b/avm/res/compute/ssh-public-key/tests/unit/custom.tests.ps1 new file mode 100644 index 0000000000..7b6a615b7b --- /dev/null +++ b/avm/res/compute/ssh-public-key/tests/unit/custom.tests.ps1 @@ -0,0 +1,7 @@ +########################### +## Additional unit tests ## +########################### +## +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. +## +########################### \ No newline at end of file diff --git a/avm/res/insights/action-group/tests/unit/custom.tests.ps1 b/avm/res/insights/action-group/tests/unit/custom.tests.ps1 new file mode 100644 index 0000000000..7b6a615b7b --- /dev/null +++ b/avm/res/insights/action-group/tests/unit/custom.tests.ps1 @@ -0,0 +1,7 @@ +########################### +## Additional unit tests ## +########################### +## +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. +## +########################### \ No newline at end of file diff --git a/avm/res/key-vault/vault/tests/unit/custom.tests.ps1 b/avm/res/key-vault/vault/tests/unit/custom.tests.ps1 index 17893bc0fc..7b6a615b7b 100644 --- a/avm/res/key-vault/vault/tests/unit/custom.tests.ps1 +++ b/avm/res/key-vault/vault/tests/unit/custom.tests.ps1 @@ -1,13 +1,7 @@ -############################# -## Addition unit tests ## -############################# +########################### +## Additional unit tests ## +########################### ## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. ## -########################################################## -## Addition unit tests ## -############################# -## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. -## -############################# \ No newline at end of file +########################### \ No newline at end of file diff --git a/avm/res/kubernetes-configuration/extension/tests/unit/custom.tests.ps1 b/avm/res/kubernetes-configuration/extension/tests/unit/custom.tests.ps1 new file mode 100644 index 0000000000..7b6a615b7b --- /dev/null +++ b/avm/res/kubernetes-configuration/extension/tests/unit/custom.tests.ps1 @@ -0,0 +1,7 @@ +########################### +## Additional unit tests ## +########################### +## +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. +## +########################### \ No newline at end of file diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 b/avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 index 17893bc0fc..7b6a615b7b 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/unit/custom.tests.ps1 @@ -1,13 +1,7 @@ -############################# -## Addition unit tests ## -############################# +########################### +## Additional unit tests ## +########################### ## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. ## -########################################################## -## Addition unit tests ## -############################# -## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. -## -############################# \ No newline at end of file +########################### \ No newline at end of file diff --git a/avm/res/network/dns-resolver/tests/unit/custom.tests.ps1 b/avm/res/network/dns-resolver/tests/unit/custom.tests.ps1 new file mode 100644 index 0000000000..7b6a615b7b --- /dev/null +++ b/avm/res/network/dns-resolver/tests/unit/custom.tests.ps1 @@ -0,0 +1,7 @@ +########################### +## Additional unit tests ## +########################### +## +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. +## +########################### \ No newline at end of file diff --git a/avm/res/network/private-endpoint/tests/unit/custom.tests.ps1 b/avm/res/network/private-endpoint/tests/unit/custom.tests.ps1 index 17893bc0fc..7b6a615b7b 100644 --- a/avm/res/network/private-endpoint/tests/unit/custom.tests.ps1 +++ b/avm/res/network/private-endpoint/tests/unit/custom.tests.ps1 @@ -1,13 +1,7 @@ -############################# -## Addition unit tests ## -############################# +########################### +## Additional unit tests ## +########################### ## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. ## -########################################################## -## Addition unit tests ## -############################# -## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. -## -############################# \ No newline at end of file +########################### \ No newline at end of file diff --git a/avm/res/network/public-ip-address/tests/unit/custom.tests.ps1 b/avm/res/network/public-ip-address/tests/unit/custom.tests.ps1 index 21302ce2c6..7b6a615b7b 100644 --- a/avm/res/network/public-ip-address/tests/unit/custom.tests.ps1 +++ b/avm/res/network/public-ip-address/tests/unit/custom.tests.ps1 @@ -1,13 +1,7 @@ -############################# -## Addition unit tests ## -############################# +########################### +## Additional unit tests ## +########################### ## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. +## You can add any custom static validation tests you want here, or add them spread accross multiple test files in the unit folder. ## -########################################################## -## Addition unit tests ## -############################# -## -## You can add any custom static validation tests you want here, or add them spread accross multple test files in the unit folder. -## -############################# +########################### \ No newline at end of file