diff --git a/src/k8s-extension/azext_k8s_extension/consts.py b/src/k8s-extension/azext_k8s_extension/consts.py index 2044f06bf4d..c69df7a73f0 100644 --- a/src/k8s-extension/azext_k8s_extension/consts.py +++ b/src/k8s-extension/azext_k8s_extension/consts.py @@ -25,4 +25,4 @@ APPLIANCE_API_VERSION = "2021-10-31-preview" HYBRIDCONTAINERSERVICE_API_VERSION = "2022-05-01-preview" -EXTENSION_TYPE_API_VERSION = "2022-04-02-preview" +EXTENSION_TYPE_API_VERSION = "2022-01-15-preview" diff --git a/testing/pipeline/k8s-custom-pipelines.yml b/testing/pipeline/k8s-custom-pipelines.yml index 4d87a15224d..c9673e2af66 100644 --- a/testing/pipeline/k8s-custom-pipelines.yml +++ b/testing/pipeline/k8s-custom-pipelines.yml @@ -41,6 +41,10 @@ stages: parameters: jobName: Cassandra path: ./test/extensions/public/Cassandra.Tests.ps1 + - template: ./templates/run-test.yml + parameters: + jobName: ExtensionTypes + path: ./test/extensions/public/ExtensionTypes.Tests.ps1 - template: ./templates/run-test.yml parameters: jobName: OpenServiceMesh diff --git a/testing/test/extensions/public/ExtensionTypes.Tests.ps1 b/testing/test/extensions/public/ExtensionTypes.Tests.ps1 new file mode 100644 index 00000000000..d9634024432 --- /dev/null +++ b/testing/test/extensions/public/ExtensionTypes.Tests.ps1 @@ -0,0 +1,33 @@ +Describe 'Extension Types Testing' { + BeforeAll { + $extensionType = "cassandradatacentersoperator" + $location = "eastus2euap" + + . $PSScriptRoot/../../helper/Constants.ps1 + . $PSScriptRoot/../../helper/Helper.ps1 + } + + It 'Performs a show extension types call' { + $output = az $Env:K8sExtensionName extension-types show -c $($ENVCONFIG.arcClusterName) -g $($ENVCONFIG.resourceGroup) --cluster-type connectedClusters --extension-type $extensionType + $? | Should -BeTrue + $output | Should -Not -BeNullOrEmpty + } + + It "Performs a cluster-scoped list extension types call" { + $output = az $Env:K8sExtensionName extension-types list -c $($ENVCONFIG.arcClusterName) -g $($ENVCONFIG.resourceGroup) --cluster-type connectedClusters + $? | Should -BeTrue + $output | Should -Not -BeNullOrEmpty + } + + It "Performs a location-scoped list extension types call" { + $output = az $Env:K8sExtensionName extension-types list-by-location --location $location + $? | Should -BeTrue + $output | Should -Not -BeNullOrEmpty + } + + It "Performs a location-scoped list extension type versions call" { + $output = az $Env:K8sExtensionName extension-types list-versions --location $location --extension-type $extensionType + $? | Should -BeTrue + $output | Should -Not -BeNullOrEmpty + } +}