Skip to content

Commit

Permalink
Uncomment GPU UT
Browse files Browse the repository at this point in the history
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty committed Apr 14, 2023
1 parent 7950cdf commit 7d24517
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hack/ci/create_aks_credentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cat <<EOF > "${TEST_AKS_CREDENTIALS_JSON}"
"aadClientId": "msi",
"aadClientSecret": "msi",
"resourceGroup": "######-###-####-####-######",
"location": "centralus",
"location": "eastus",
"vnetName": "#####",
"vnetResourceGroup": "######-###-####-####-######",
"userAssignedIdentityID": "######-###-####-####-######"
Expand Down
9 changes: 5 additions & 4 deletions pkg/provider/aci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ func TestCreatePodWithResourceRequestOnly(t *testing.T) {

// Tests create pod with default GPU SKU.
func TestCreatePodWithGPU(t *testing.T) {
t.Skip("Skipping GPU tests until Location API is fixed")
podName := "pod-" + uuid.New().String()
podNamespace := "ns-" + uuid.New().String()
mockCtrl := gomock.NewController(t)
Expand Down Expand Up @@ -380,15 +379,15 @@ func TestCreatePodWithGPU(t *testing.T) {
t.Fatal("failed to create the test provider", err)
}

provider.gpuSKUs = []azaciv2.GpuSKU{azaciv2.GpuSKUK80, azaciv2.GpuSKUP100}

if err := provider.CreatePod(context.Background(), pod); err != nil {
t.Fatal("Failed to create pod", err)
}
}

// Tests create pod with GPU SKU in annotation.
func TestCreatePodWithGPUSKU(t *testing.T) {
t.Skip("Skipping GPU tests until Location API is fixed")

podName := "pod-" + uuid.New().String()
podNamespace := "ns-" + uuid.New().String()
mockCtrl := gomock.NewController(t)
Expand All @@ -406,7 +405,7 @@ func TestCreatePodWithGPUSKU(t *testing.T) {
assert.Check(t, is.Equal(3.4, *(containers[0]).Properties.Resources.Requests.MemoryInGB), "Request Memory is not expected")
assert.Check(t, (containers[0]).Properties.Resources.Requests.Gpu != nil, "Requests GPU is not expected")
assert.Check(t, is.Equal(int32(1), *(containers[0]).Properties.Resources.Requests.Gpu.Count), "Requests GPU Count is not expected")
assert.Check(t, is.Equal(gpuSKU, (containers[0]).Properties.Resources.Requests.Gpu.SKU), "Requests GPU SKU is not expected")
assert.Check(t, is.Equal(gpuSKU, *(containers[0]).Properties.Resources.Requests.Gpu.SKU), "Requests GPU SKU is not expected")
assert.Check(t, (containers[0]).Properties.Resources.Limits.Gpu != nil, "Limits GPU is not expected")

return nil
Expand All @@ -418,6 +417,8 @@ func TestCreatePodWithGPUSKU(t *testing.T) {
t.Fatal("failed to create the test provider", err)
}

provider.gpuSKUs = []azaciv2.GpuSKU{azaciv2.GpuSKUK80, azaciv2.GpuSKUP100}

pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: podName,
Expand Down

0 comments on commit 7d24517

Please sign in to comment.