chore: make owner_name and owner_username consistent (#18081)

We've been using owner_name inconsistently as username. So this PR fixes
it by making the attribute naming more consistent.
This commit is contained in:
Bruno Quaresma
2025-05-28 17:25:32 -03:00
committed by GitHub
parent 3a2e36237d
commit 2ec7404197
53 changed files with 151 additions and 131 deletions
+8 -8
View File
@@ -91,8 +91,8 @@ func Test_buildAppLinkURL(t *testing.T) {
name: "without subdomain",
baseURL: "https://coder.tld",
workspace: codersdk.Workspace{
Name: "Test-Workspace",
OwnerName: "username",
Name: "Test-Workspace",
OwnerUsername: "username",
},
agent: codersdk.WorkspaceAgent{
Name: "a-workspace-agent",
@@ -108,8 +108,8 @@ func Test_buildAppLinkURL(t *testing.T) {
name: "with command",
baseURL: "https://coder.tld",
workspace: codersdk.Workspace{
Name: "Test-Workspace",
OwnerName: "username",
Name: "Test-Workspace",
OwnerUsername: "username",
},
agent: codersdk.WorkspaceAgent{
Name: "a-workspace-agent",
@@ -123,8 +123,8 @@ func Test_buildAppLinkURL(t *testing.T) {
name: "with subdomain",
baseURL: "ftps://coder.tld",
workspace: codersdk.Workspace{
Name: "Test-Workspace",
OwnerName: "username",
Name: "Test-Workspace",
OwnerUsername: "username",
},
agent: codersdk.WorkspaceAgent{
Name: "a-workspace-agent",
@@ -141,8 +141,8 @@ func Test_buildAppLinkURL(t *testing.T) {
name: "with subdomain, but not apps host",
baseURL: "https://coder.tld",
workspace: codersdk.Workspace{
Name: "Test-Workspace",
OwnerName: "username",
Name: "Test-Workspace",
OwnerUsername: "username",
},
agent: codersdk.WorkspaceAgent{
Name: "a-workspace-agent",