chore: ensure default org always exists (#12412)

* chore: ensure default org always exists

First user just joins the org created by the migration
This commit is contained in:
Steven Masley
2024-03-05 14:06:35 -06:00
committed by GitHub
parent bc30c9c013
commit 17c486c5e6
9 changed files with 71 additions and 32 deletions
+5 -1
View File
@@ -87,6 +87,10 @@ func TestTemplateList(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, &coderdtest.Options{})
owner := coderdtest.CreateFirstUser(t, client)
org, err := client.Organization(context.Background(), owner.OrganizationID)
require.NoError(t, err)
templateAdmin, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID, rbac.RoleTemplateAdmin())
inv, root := clitest.New(t, "templates", "list")
@@ -107,7 +111,7 @@ func TestTemplateList(t *testing.T) {
require.NoError(t, <-errC)
pty.ExpectMatch("No templates found in")
pty.ExpectMatch(coderdtest.FirstUserParams.Username)
pty.ExpectMatch(org.Name)
pty.ExpectMatch("Create one:")
})
}