Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Remove skipping GPU unit tests #536

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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