Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
fix: Respect Multiplexer No Clients (#313)
Browse files Browse the repository at this point in the history
* Update execution.go

* Respond to comments

* simplify

* Update provider.go

* Update execution.go

* Update execution.go

* Update execution.go

* Update execution.go

* Add Low Level Copy support

* Create mock_storage.go

* Update storage_test.go

* Update mocks_test.go

* Fixed code gen

* Update storage.go

* break out

* Update storage.go

* Update mock_storage.go

* comments

* Update storage.go

* add copier to storage

* Update storage.go

* Update execution.go

* Update execution_test.go

* Update execution.go

* Update execution_test.go

* Update execution.go

* Update execution_test.go
  • Loading branch information
bbernays authored Jun 7, 2022
1 parent 67d776f commit c873426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions provider/execution/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ func NewTableExecutor(resourceName string, db Storage, logger hclog.Logger, tabl
func (e TableExecutor) Resolve(ctx context.Context, meta schema.ClientMeta) (uint64, diag.Diagnostics) {
var clients []schema.ClientMeta

clients = append(clients, meta)

if e.Table.Multiplex != nil {
clients = e.Table.Multiplex(meta)
}
if len(clients) == 0 {
clients = append(clients, meta)
}

return e.doMultiplexResolve(ctx, clients)
}
Expand Down
2 changes: 1 addition & 1 deletion provider/execution/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func TestTableExecutor_Resolve(t *testing.T) {
Resolver: returnValueResolver,
Columns: commonColumns,
},
ExpectedResourceCount: 1,
ExpectedResourceCount: 0,
},
{
// if tables don't define a resolver, an execution error by execution
Expand Down

0 comments on commit c873426

Please sign in to comment.