Skip to content

Commit ddb4c48

Browse files
committed
pkg/asset/installconfig/azure: fixup unit tests
Regenerates mocks so they use the latest azure compute packages. Updates tests to use ResourceSku from the copmute package.
1 parent 806f49a commit ddb4c48

File tree

3 files changed

+12
-30
lines changed

3 files changed

+12
-30
lines changed

pkg/asset/installconfig/azure/mock/azureclient_generated.go

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/asset/installconfig/azure/validation_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"net"
66
"testing"
77

8-
azsku "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/compute/mgmt/compute"
98
aznetwork "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/network/mgmt/network"
109
azres "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/resources"
1110
azsubs "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/subscriptions"
@@ -54,16 +53,16 @@ var (
5453
"Standard_DC8s_v3": {"vCPUsAvailable": "8", "MemoryGB": "32", "PremiumIO": "True", "HyperVGenerations": "V2", "AcceleratedNetworkingEnabled": "True", "CpuArchitectureType": "x64", "ConfidentialComputingType": "SGX"},
5554
}
5655

57-
instanceTypeSku = func() []*azsku.ResourceSku {
58-
instances := make([]*azsku.ResourceSku, 0, len(vmCapabilities))
56+
instanceTypeSku = func() []*azenc.ResourceSku {
57+
instances := make([]*azenc.ResourceSku, 0, len(vmCapabilities))
5958
for typeName, capsMap := range vmCapabilities {
60-
capabilities := make([]azsku.ResourceSkuCapabilities, 0, len(capsMap))
59+
capabilities := make([]azenc.ResourceSkuCapabilities, 0, len(capsMap))
6160
for name, value := range capsMap {
62-
capabilities = append(capabilities, azsku.ResourceSkuCapabilities{
61+
capabilities = append(capabilities, azenc.ResourceSkuCapabilities{
6362
Name: to.StringPtr(name), Value: to.StringPtr(value),
6463
})
6564
}
66-
instances = append(instances, &azsku.ResourceSku{
65+
instances = append(instances, &azenc.ResourceSku{
6766
Name: to.StringPtr(typeName), Capabilities: &capabilities,
6867
})
6968
}

pkg/asset/installconfig/gcp/mock/usertags_mock.go

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)