mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
fix race in MockResourceProvider
Input can be called concurrently from multiple nodes in the graph.
This commit is contained in:
parent
08339b004b
commit
db6ef69e5b
@ -94,6 +94,8 @@ func (p *MockResourceProvider) Close() error {
|
||||
|
||||
func (p *MockResourceProvider) Input(
|
||||
input UIInput, c *ResourceConfig) (*ResourceConfig, error) {
|
||||
p.Lock()
|
||||
defer p.Unlock()
|
||||
p.InputCalled = true
|
||||
p.InputInput = input
|
||||
p.InputConfig = c
|
||||
|
Loading…
Reference in New Issue
Block a user