Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Oct 6, 2022
1 parent d1c01dd commit 63b6bc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdk/go/pulumi/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,25 +873,25 @@ func TestDependsOnComponent(t *testing.T) {
ctx, err := NewContext(context.Background(), RunInfo{})
assert.Nil(t, err)

registerResource := func(name string, res Resource, options ...ResourceOption) (Resource, []string) {
registerResource := func(name string, res Resource, custom bool, options ...ResourceOption) (Resource, []string) {
opts := merge(options...)
state := ctx.makeResourceState("", "", res, nil, nil, "", "", nil, nil)
state.resolve(ctx, nil, nil, name, "", &structpb.Struct{}, nil)

inputs, err := ctx.prepareResourceInputs(res, Map{}, "", opts, state, false)
inputs, err := ctx.prepareResourceInputs(res, Map{}, "", opts, state, false, custom)
require.NoError(t, err)

return res, inputs.deps
}

newResource := func(name string, options ...ResourceOption) (Resource, []string) {
var res testResource
return registerResource(name, &res, options...)
return registerResource(name, &res, true, options...)
}

newComponent := func(name string, options ...ResourceOption) (Resource, []string) {
var res simpleComponentResource
return registerResource(name, &res, options...)
return registerResource(name, &res, false, options...)
}

resA, _ := newResource("resA", nil)
Expand Down

0 comments on commit 63b6bc6

Please sign in to comment.