|
4 | 4 | package helpers
|
5 | 5 |
|
6 | 6 | import (
|
| 7 | + "testing" |
| 8 | + |
7 | 9 | "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute"
|
8 | 10 | "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-10-01/resources"
|
9 | 11 | "github.com/Azure/go-autorest/autorest/to"
|
10 | 12 | "github.com/stretchr/testify/assert"
|
11 |
| - "testing" |
12 | 13 | )
|
13 | 14 |
|
14 | 15 | // TestRetrieveFromStruct tests the RetrieveFromStruct function, ensuring that values are correctly retrieved and
|
@@ -66,7 +67,7 @@ func TestRetrieveFromStruct(t *testing.T) {
|
66 | 67 | ImageReference: &compute.ImageReference{
|
67 | 68 | Offer: to.StringPtr("0001-com-ubuntu-server-focal"),
|
68 | 69 | Publisher: to.StringPtr("Canonical"),
|
69 |
| - Sku: to.StringPtr("20_04-lts"), |
| 70 | + Sku: to.StringPtr("24_04-lts-amd64"), |
70 | 71 | Version: to.StringPtr("latest"),
|
71 | 72 | },
|
72 | 73 | },
|
@@ -110,7 +111,7 @@ func TestRetrieveFromStruct(t *testing.T) {
|
110 | 111 | publisher := RetrieveFromStruct(nfsVM, "VirtualMachineProperties", "StorageProfile", "ImageReference", "Publisher")()
|
111 | 112 | assert.Equal(t, "Canonical", publisher)
|
112 | 113 | sku := RetrieveFromStruct(nfsVM, "VirtualMachineProperties", "StorageProfile", "ImageReference", "Sku")()
|
113 |
| - assert.Equal(t, "20_04-lts", sku) |
| 114 | + assert.Equal(t, "24_04-lts-amd64", sku) |
114 | 115 | version := RetrieveFromStruct(nfsVM, "VirtualMachineProperties", "StorageProfile", "ImageReference", "Version")()
|
115 | 116 | assert.Equal(t, "latest", version)
|
116 | 117 | }
|
0 commit comments