lint
This commit is contained in:
parent
6bb5609447
commit
26ac9b3fe2
|
@ -451,7 +451,7 @@ func TestSingleResourceExplicitProviderAliasUpdateDelete(t *testing.T) {
|
||||||
registerResource = false
|
registerResource = false
|
||||||
|
|
||||||
p.Steps = []TestStep{{Op: Update}}
|
p.Steps = []TestStep{{Op: Update}}
|
||||||
snap = p.Run(t, snap)
|
_ = p.Run(t, snap)
|
||||||
|
|
||||||
// Check the identity of the provider that performed the delete.
|
// Check the identity of the provider that performed the delete.
|
||||||
deleterID, ok := deletes.Load(resourceID)
|
deleterID, ok := deletes.Load(resourceID)
|
||||||
|
|
|
@ -320,7 +320,7 @@ func (r *Registry) Diff(urn resource.URN, id resource.ID, olds, news resource.Pr
|
||||||
|
|
||||||
// Same executes as part of the "Same" step for a provider that has not changed. It exists solely to allow the registry
|
// Same executes as part of the "Same" step for a provider that has not changed. It exists solely to allow the registry
|
||||||
// to point aliases for a provider to the proper object.
|
// to point aliases for a provider to the proper object.
|
||||||
func (r *Registry) Same(ref Reference) error {
|
func (r *Registry) Same(ref Reference) {
|
||||||
r.m.RLock()
|
r.m.RLock()
|
||||||
defer r.m.RUnlock()
|
defer r.m.RUnlock()
|
||||||
|
|
||||||
|
@ -332,8 +332,6 @@ func (r *Registry) Same(ref Reference) error {
|
||||||
aliasRef := mustNewReference(alias, ref.ID())
|
aliasRef := mustNewReference(alias, ref.ID())
|
||||||
r.providers[ref] = r.providers[aliasRef]
|
r.providers[ref] = r.providers[aliasRef]
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create coonfigures the provider with the given URN using the indicated configuration, assigns it an ID, and
|
// Create coonfigures the provider with the given URN using the indicated configuration, assigns it an ID, and
|
||||||
|
|
|
@ -129,7 +129,8 @@ func (s *SameStep) Apply(preview bool) (resource.Status, StepCompleteFunc, error
|
||||||
if providers.IsProviderType(s.new.Type) {
|
if providers.IsProviderType(s.new.Type) {
|
||||||
ref, err := providers.NewReference(s.new.URN, s.new.ID)
|
ref, err := providers.NewReference(s.new.URN, s.new.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return resource.StatusOK, nil, errors.Errorf("bad provider reference '%v' for resource %v: %v", s.Provider(), s.URN(), err)
|
return resource.StatusOK, nil, errors.Errorf(
|
||||||
|
"bad provider reference '%v' for resource %v: %v", s.Provider(), s.URN(), err)
|
||||||
}
|
}
|
||||||
s.Deployment().SameProvider(ref)
|
s.Deployment().SameProvider(ref)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue