Skip to content

feat: implement organization context in the cli #12259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Feb 26, 2024
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
Emyrk committed Feb 23, 2024
commit 510dbb8be36d644349e4d11a7d7c0ff5c6d35234
6 changes: 3 additions & 3 deletions coderd/organizations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestOrganizationByUserAndName(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()

_, err := client.OrganizationByName(ctx, codersdk.Me, "nothing")
_, err := client.OrganizationByUserAndName(ctx, codersdk.Me, "nothing")
var apiErr *codersdk.Error
require.ErrorAs(t, err, &apiErr)
require.Equal(t, http.StatusNotFound, apiErr.StatusCode())
Expand All @@ -85,7 +85,7 @@ func TestOrganizationByUserAndName(t *testing.T) {
Name: "another",
})
require.NoError(t, err)
_, err = other.OrganizationByName(ctx, codersdk.Me, org.Name)
_, err = other.OrganizationByUserAndName(ctx, codersdk.Me, org.Name)
var apiErr *codersdk.Error
require.ErrorAs(t, err, &apiErr)
require.Equal(t, http.StatusNotFound, apiErr.StatusCode())
Expand All @@ -101,7 +101,7 @@ func TestOrganizationByUserAndName(t *testing.T) {

org, err := client.Organization(ctx, user.OrganizationID)
require.NoError(t, err)
_, err = client.OrganizationByName(ctx, codersdk.Me, org.Name)
_, err = client.OrganizationByUserAndName(ctx, codersdk.Me, org.Name)
require.NoError(t, err)
})
}
Expand Down