Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 0e63d2f

Browse files
committed
internal/cmd/users_test.go: assert CICD user instead of admin
1 parent eefa2f3 commit 0e63d2f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

internal/cmd/update.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,9 @@ func (u *updater) Run(ctx context.Context, force bool, coderURLArg string, versi
180180

181181
// TODO: validate the checksum of the downloaded file. GitHub does not currently provide this information
182182
// and we do not generate them yet.
183-
var updatedBinaryName string
183+
updatedBinaryName := "coder"
184184
if u.osF() == "windows" {
185185
updatedBinaryName = "coder.exe"
186-
} else {
187-
updatedBinaryName = "coder"
188186
}
189187
updatedBinary, err := extractFromArchive(updatedBinaryName, downloadBuf.Bytes())
190188
if err != nil {

internal/cmd/users_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ func Test_users(t *testing.T) {
1616
res := execute(t, nil, "users", "ls", "--output=json")
1717
res.success(t)
1818
res.stdoutUnmarshals(t, &users)
19-
assertAdmin(t, users)
19+
assertCICD(t, users)
2020

2121
res = execute(t, nil, "users", "ls", "--output=human")
2222
res.success(t)
2323
}
2424

25-
func assertAdmin(t *testing.T, users []coder.User) {
25+
func assertCICD(t *testing.T, users []coder.User) {
2626
for _, u := range users {
27-
if u.Username == "admin" {
27+
if u.Username == "cicd" {
2828
return
2929
}
3030
}
31-
slogtest.Fatal(t, "did not find admin user", slog.F("users", users))
31+
slogtest.Fatal(t, "did not find cicd user", slog.F("users", users))
3232
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy