Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

feature: support filtering by workspace provider when listing environ… #282

Merged
merged 6 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make lint
  • Loading branch information
Faris Huskovic committed Mar 11, 2021
commit f70a3c5a968009a00d50e6cd3c17dbc341145e8f
1 change: 1 addition & 0 deletions coder-sdk/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ func (c *DefaultClient) EnvironmentByID(ctx context.Context, id string) (*Enviro
return &env, nil
}

// EnvironmentsByWorkspaceProvider returns all environments that belong to a particular workspace provider.
func (c *DefaultClient) EnvironmentsByWorkspaceProvider(ctx context.Context, wpID string) ([]Environment, error) {
var envs []Environment
if err := c.requestBody(ctx, http.MethodGet, "/api/private/resource-pools/"+wpID+"/environments", nil, &envs); err != nil {
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (r result) clogError(t *testing.T) clog.CLIError {
return cliErr
}

//nolint
func execute(t *testing.T, in io.Reader, args ...string) result {
cmd := Make()

Expand Down
1 change: 1 addition & 0 deletions internal/cmd/envs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func Test_envs_ls(t *testing.T) {
res.stdoutUnmarshals(t, &envs)
}

//nolint
func Test_envs_ls_by_provider(t *testing.T) {
for _, test := range []struct {
name string
Expand Down