Skip to content

Commit

Permalink
do not validate against scoring fe if inference is not enabled. (Azur…
Browse files Browse the repository at this point in the history
…e#33)

* do not validate against scoring fe if inference is not enabled.

* add inference enabled scenario

* refine

* increase sleeping time

* fix

Co-authored-by: Yue Yu <yuyu3@microsoft.com>
Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
  • Loading branch information
3 people authored May 13, 2021
1 parent fea6e00 commit 877868c
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions testing/test/extensions/public/AzureMLKubernetes.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe 'AzureML Kubernetes Testing' {
. $PSScriptRoot/../../helper/Helper.ps1
}

It 'Creates the extension and checks that it onboards correctly' {
$output = az k8s-extension create -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters --extension-type $extensionType --name $extensionName --release-train preview --config enableTraining=true allowInsecureConnections=true
It 'Creates the extension and checks that it onboards correctly with training enabled' {
$output = az k8s-extension create -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters --extension-type $extensionType --name $extensionName --release-train staging --config enableTraining=true
$? | Should -BeTrue

$output = az k8s-extension show -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters --name $extensionName
Expand All @@ -27,7 +27,7 @@ Describe 'AzureML Kubernetes Testing' {
if (Get-ExtensionStatus $extensionName -eq $SUCCESS_MESSAGE) {
break
}
Start-Sleep -Seconds 10
Start-Sleep -Seconds 20
$n += 1
} while ($n -le $MAX_RETRY_ATTEMPTS)
$n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS
Expand Down Expand Up @@ -64,7 +64,7 @@ Describe 'AzureML Kubernetes Testing' {
break
}
}
Start-Sleep -Seconds 10
Start-Sleep -Seconds 20
$n += 1
} while ($n -le $MAX_RETRY_ATTEMPTS)
$n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS
Expand Down Expand Up @@ -100,4 +100,40 @@ Describe 'AzureML Kubernetes Testing' {
$extensionExists = $output | ConvertFrom-Json | Where-Object { $_.extensionType -eq $extensionName }
$extensionExists | Should -BeNullOrEmpty
}

It 'Creates the extension and checks that it onboards correctly with inference enabled' {
$output = az k8s-extension create -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters --extension-type $extensionType --name $extensionName --release-train staging --config enableInference=true identity.proxy.remoteEnabled=True identity.proxy.remoteHost=https://master.experiments.azureml-test.net allowInsecureConnections=True clusterPurpose=DevTest
$? | Should -BeTrue

$output = az k8s-extension show -c $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters --name $extensionName
$? | Should -BeTrue

$isAutoUpgradeMinorVersion = ($output | ConvertFrom-Json).autoUpgradeMinorVersion
$isAutoUpgradeMinorVersion.ToString() -eq "True" | Should -BeTrue

# Loop and retry until the extension installs
$n = 0
do
{
if (Get-ExtensionStatus $extensionName -eq $SUCCESS_MESSAGE) {
break
}
Start-Sleep -Seconds 20
$n += 1
} while ($n -le $MAX_RETRY_ATTEMPTS)
$n | Should -BeLessOrEqual $MAX_RETRY_ATTEMPTS

# check if relay is populated
$relayResourceID = Get-ExtensionConfigurationSettings $extensionName $relayResourceIDKey
$relayResourceID | Should -Not -BeNullOrEmpty
}

It "Deletes the extension from the cluster with inference enabled" {
az k8s-extension delete --cluster-name $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters --name $extensionName
$? | Should -BeTrue

# Extension should not be found on the cluster
az k8s-extension show --cluster-name $ENVCONFIG.arcClusterName -g $ENVCONFIG.resourceGroup --cluster-type connectedClusters --name $extensionName
$? | Should -BeFalse
}
}

0 comments on commit 877868c

Please sign in to comment.