Add MetaReset
Make sure the ArmClient gets a new StopContext for each test
This commit is contained in:
parent
ecb1944c31
commit
343b96c9d7
|
@ -194,6 +194,12 @@ func providerConfigure(p *schema.Provider) schema.ConfigureFunc {
|
|||
|
||||
client.StopContext = p.StopContext()
|
||||
|
||||
// replaces the context between tests
|
||||
p.MetaReset = func() error {
|
||||
client.StopContext = p.StopContext()
|
||||
return nil
|
||||
}
|
||||
|
||||
// List all the available providers and their registration state to avoid unnecessary
|
||||
// requests. This also lets us check if the provider credentials are correct.
|
||||
providerList, err := client.providers.List(nil, "")
|
||||
|
|
Loading…
Reference in New Issue