mirror of https://github.com/hashicorp/packer
parent
b3e361a139
commit
a3b49cdc08
@ -0,0 +1,18 @@
|
||||
package chroot
|
||||
|
||||
import "github.com/hashicorp/packer/builder/azure/common/client"
|
||||
|
||||
func withMetadataStub(f func()) {
|
||||
mdc := client.DefaultMetadataClient
|
||||
defer func() { client.DefaultMetadataClient = mdc }()
|
||||
client.DefaultMetadataClient = client.MetadataClientStub{
|
||||
ComputeInfo: client.ComputeInfo{
|
||||
SubscriptionID: "testSubscriptionID",
|
||||
ResourceGroupName: "testResourceGroup",
|
||||
Name: "testVM",
|
||||
Location: "testLocation",
|
||||
},
|
||||
}
|
||||
|
||||
f()
|
||||
}
|
||||
Loading…
Reference in new issue