chore: rollback PR #18081 (#18104)

Rollback https://github.com/coder/coder/pull/18081
This commit is contained in:
Bruno Quaresma
2025-05-29 13:12:13 -03:00
committed by GitHub
parent 345001ffd1
commit d779126ee3
56 changed files with 146 additions and 164 deletions

View File

@ -25,7 +25,7 @@ import (
)
const (
fakeOwnerUsername = "fake-owner-name"
fakeOwnerName = "fake-owner-name"
fakeServerURL = "https://fake-foo-url"
fakeWorkspaceName = "fake-workspace-name"
)
@ -41,7 +41,7 @@ func TestVerifyWorkspaceOutdated(t *testing.T) {
t.Run("Up-to-date", func(t *testing.T) {
t.Parallel()
workspace := codersdk.Workspace{Name: fakeWorkspaceName, OwnerUsername: fakeOwnerUsername}
workspace := codersdk.Workspace{Name: fakeWorkspaceName, OwnerName: fakeOwnerName}
_, outdated := verifyWorkspaceOutdated(&client, workspace)
@ -50,7 +50,7 @@ func TestVerifyWorkspaceOutdated(t *testing.T) {
t.Run("Outdated", func(t *testing.T) {
t.Parallel()
workspace := codersdk.Workspace{Name: fakeWorkspaceName, OwnerUsername: fakeOwnerUsername, Outdated: true}
workspace := codersdk.Workspace{Name: fakeWorkspaceName, OwnerName: fakeOwnerName, Outdated: true}
updateWorkspaceBanner, outdated := verifyWorkspaceOutdated(&client, workspace)
@ -65,10 +65,10 @@ func TestBuildWorkspaceLink(t *testing.T) {
serverURL, err := url.Parse(fakeServerURL)
require.NoError(t, err)
workspace := codersdk.Workspace{Name: fakeWorkspaceName, OwnerUsername: fakeOwnerUsername}
workspace := codersdk.Workspace{Name: fakeWorkspaceName, OwnerName: fakeOwnerName}
workspaceLink := buildWorkspaceLink(serverURL, workspace)
assert.Equal(t, workspaceLink.String(), fakeServerURL+"/@"+fakeOwnerUsername+"/"+fakeWorkspaceName)
assert.Equal(t, workspaceLink.String(), fakeServerURL+"/@"+fakeOwnerName+"/"+fakeWorkspaceName)
}
func TestCloserStack_Mainline(t *testing.T) {