Add MetaReset

Make sure the ArmClient gets a new StopContext for each test
This commit is contained in:
James Bardin 2017-03-07 11:34:07 -05:00
parent ecb1944c31
commit 343b96c9d7
1 changed files with 6 additions and 0 deletions

View File

@ -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, "")