mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
17 lines
501 B
Go
17 lines
501 B
Go
|
package terraform
|
||
|
|
||
|
// MockResourceProvider implements ResourceProvider but mocks out all the
|
||
|
// calls for testing purposes.
|
||
|
type MockResourceProvider struct {
|
||
|
ConfigureCalled bool
|
||
|
ConfigureConfig map[string]interface{}
|
||
|
ConfigureReturnWarnings []string
|
||
|
ConfigureReturnError error
|
||
|
}
|
||
|
|
||
|
func (p *MockResourceProvider) Configure(c map[string]interface{}) ([]string, error) {
|
||
|
p.ConfigureCalled = true
|
||
|
p.ConfigureConfig = c
|
||
|
return p.ConfigureReturnWarnings, p.ConfigureReturnError
|
||
|
}
|