diff --git a/testing/test/configurations/Configuration.HelmOperator.Tests.ps1 b/testing/test/configurations/Configuration.HelmOperator.Tests.ps1 index 8b89ba24c58..2d7bbf173ea 100644 --- a/testing/test/configurations/Configuration.HelmOperator.Tests.ps1 +++ b/testing/test/configurations/Configuration.HelmOperator.Tests.ps1 @@ -27,91 +27,6 @@ Describe 'Source Control Configuration (Helm Operator Properties) Testing' { $n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS } - It "Updates the helm operator params and performs a show" { - Set-ItResult -Skipped -Because "Update is not a valid scenario for now" - - az k8s-configuration update -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type "connectedClusters" -n $configurationName --helm-operator-params $customOperatorParams - $? | Should -BeTrue - - $output = az k8s-configuration show --cluster-name $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters -n $configurationName - $? | Should -BeTrue - - $configData = $output | ConvertFrom-Json | Where-Object { $_.id -Match $configurationName } - ($configData.helmOperatorProperties.chartValues -eq $customOperatorParams) | Should -BeTrue - - # Loop and retry until the configuration updates - $n = 0 - do - { - $helmOperatorChartValues = (Get-ConfigData $configurationName).spec.helmOperatorProperties.chartValues - if ($helmOperatorChartValues -ne $null -And $helmOperatorChartValues.ToString() -eq $customOperatorParams) { - if (Get-ConfigStatus $configurationName -Match $SUCCESS_MESSAGE) { - break - } - } - Start-Sleep -Seconds 10 - $n += 1 - } while ($n -le $MAX_RETRY_ATTEMPTS) - $n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS - } - - It "Updates the helm operator chart version and performs a show" { - Set-ItResult -Skipped -Because "Update is not a valid scenario for now" - - az k8s-configuration update -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type "connectedClusters" -n $configurationName --helm-operator-chart-version $customChartVersion - $? | Should -BeTrue - - $output = az k8s-configuration show --cluster-name $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters -n $configurationName - $? | Should -BeTrue - - # Check that the helmOperatorProperties chartValues didn't change - $configData = $output | ConvertFrom-Json | Where-Object { $_.id -Match $configurationName } - ($configData.helmOperatorProperties.chartValues -eq $customOperatorParams) | Should -BeTrue - ($configData.helmOperatorProperties.chartVersion -eq $customChartVersion) | Should -BeTrue - - # Loop and retry until the configuration updates - $n = 0 - do - { - $helmOperatorChartVersion = (Get-ConfigData $configurationName).spec.helmOperatorProperties.chartVersion - if ($helmOperatorChartVersion -ne $null -And $helmOperatorChartVersion.ToString() -eq $customChartVersion) { - if (Get-ConfigStatus $configurationName -Match $SUCCESS_MESSAGE) { - break - } - } - Start-Sleep -Seconds 10 - $n += 1 - } while ($n -le $MAX_RETRY_ATTEMPTS) - $n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS - } - - It "Disables the helm operator on the cluster" { - Set-ItResult -Skipped -Because "Update is not a valid scenario for now" - - az k8s-configuration update -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type "connectedClusters" -n $configurationName --enable-helm-operator=false - $? | Should -BeTrue - - $output = az k8s-configuration show --cluster-name $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters -n $configurationName - $? | Should -BeTrue - - $helmOperatorEnabled = ($output | ConvertFrom-Json).enableHelmOperator - $helmOperatorEnabled.ToString() -eq "False" | Should -BeTrue - - # Loop and retry until the configuration updates - $n = 0 - do { - $helmOperatorEnabled = (Get-ConfigData $configurationName).spec.enableHelmOperator - if ($helmOperatorEnabled -ne $null -And $helmOperatorEnabled.ToString() -eq "False") { - if (Get-ConfigStatus $configurationName -Match $SUCCESS_MESSAGE) { - break - } - } - Start-Sleep -Seconds 10 - $n += 1 - } while ($n -le $MAX_RETRY_ATTEMPTS) - $n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS - } - It "Lists the configurations on the cluster" { $output = az k8s-configuration list -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters $? | Should -BeTrue diff --git a/testing/test/configurations/Configuration.Tests.ps1 b/testing/test/configurations/Configuration.Tests.ps1 index 23a8170fd44..3ab06b06b1d 100644 --- a/testing/test/configurations/Configuration.Tests.ps1 +++ b/testing/test/configurations/Configuration.Tests.ps1 @@ -28,33 +28,6 @@ Describe 'Basic Source Control Configuration Testing' { $output | Should -Not -BeNullOrEmpty } - It "Runs an update on the configuration on the cluster" { - Set-ItResult -Skipped -Because "Update is not a valid scenario for now" - - az k8s-configuration update -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters -n $configurationName --enable-helm-operator - $? | Should -BeTrue - - $output = az k8s-configuration show --cluster-name $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters -n $configurationName - $? | Should -BeTrue - - $helmOperatorEnabled = ($output | ConvertFrom-Json).enableHelmOperator - $helmOperatorEnabled.ToString() -eq "True" | Should -BeTrue - - # Loop and retry until the configuration updates - $n = 0 - do { - $helmOperatorEnabled = (Get-ConfigData $configurationName).spec.enableHelmOperator - if ($helmOperatorEnabled -And $helmOperatorEnabled.ToString() -eq "True") { - if (Get-ConfigStatus $configurationName -Match $SUCCESS_MESSAGE) { - break - } - } - Start-Sleep -Seconds 10 - $n += 1 - } while ($n -le $MAX_RETRY_ATTEMPTS) - $n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS - } - It "Performs a re-PUT of the configuration on the cluster, with HTTPS in caps" { az k8s-configuration create -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type "connectedClusters" -u "HTTPS://github.com/Azure/arc-k8s-demo" -n $configurationName --scope cluster --enable-helm-operator=false --operator-namespace $configurationName $? | Should -BeTrue