Skip to content

Commit 8b7942c

Browse files
committed
remove excess test
1 parent 7595012 commit 8b7942c

File tree

2 files changed

+3
-37
lines changed

2 files changed

+3
-37
lines changed

cli/organization_test.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -113,40 +113,6 @@ func TestCurrentOrganization(t *testing.T) {
113113
})
114114
}
115115

116-
func TestOrganizationSwitch(t *testing.T) {
117-
t.Parallel()
118-
119-
t.Run("Switch", func(t *testing.T) {
120-
t.Parallel()
121-
ownerClient := coderdtest.New(t, nil)
122-
first := coderdtest.CreateFirstUser(t, ownerClient)
123-
// Owner is required to make orgs
124-
client, _ := coderdtest.CreateAnotherUser(t, ownerClient, first.OrganizationID, rbac.RoleOwner())
125-
126-
ctx := testutil.Context(t, testutil.WaitMedium)
127-
orgs := []string{"foo", "bar"}
128-
for _, orgName := range orgs {
129-
_, err := client.CreateOrganization(ctx, codersdk.CreateOrganizationRequest{
130-
Name: orgName,
131-
})
132-
require.NoError(t, err)
133-
}
134-
135-
exp, err := client.OrganizationByName(ctx, "foo")
136-
require.NoError(t, err)
137-
138-
inv, root := clitest.New(t, "organizations", "set", "foo")
139-
clitest.SetupConfig(t, client, root)
140-
pty := ptytest.New(t).Attach(inv)
141-
errC := make(chan error)
142-
go func() {
143-
errC <- inv.Run()
144-
}()
145-
require.NoError(t, <-errC)
146-
pty.ExpectMatch(exp.ID.String())
147-
})
148-
}
149-
150116
func must[V any](v V, err error) V {
151117
if err != nil {
152118
panic(err)

cli/organizationmembers_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func TestAddOrganizationMembers(t *testing.T) {
5656
})
5757
require.NoError(t, err, "create another organization")
5858

59-
inv, root := clitest.New(t, "organization", "members", "add", "--organization", otherOrg.ID.String(), user.Username)
59+
inv, root := clitest.New(t, "organization", "members", "add", "-z", otherOrg.ID.String(), user.Username)
6060
//nolint:gocritic // must be an owner
6161
clitest.SetupConfig(t, ownerClient, root)
6262

@@ -86,7 +86,7 @@ func TestRemoveOrganizationMembers(t *testing.T) {
8686

8787
ctx := testutil.Context(t, testutil.WaitMedium)
8888

89-
inv, root := clitest.New(t, "organization", "members", "remove", "--organization", owner.OrganizationID.String(), user.Username)
89+
inv, root := clitest.New(t, "organization", "members", "remove", "-z", owner.OrganizationID.String(), user.Username)
9090
clitest.SetupConfig(t, orgAdminClient, root)
9191

9292
buf := new(bytes.Buffer)
@@ -109,7 +109,7 @@ func TestRemoveOrganizationMembers(t *testing.T) {
109109

110110
ctx := testutil.Context(t, testutil.WaitMedium)
111111

112-
inv, root := clitest.New(t, "organization", "members", "remove", "--organization", owner.OrganizationID.String(), "random_name")
112+
inv, root := clitest.New(t, "organization", "members", "remove", "-z", owner.OrganizationID.String(), "random_name")
113113
clitest.SetupConfig(t, orgAdminClient, root)
114114

115115
buf := new(bytes.Buffer)

0 commit comments

Comments
 (0)