Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commit0e63d2f

Browse files
committed
internal/cmd/users_test.go: assert CICD user instead of admin
1 parenteefa2f3 commit0e63d2f

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-
varupdatedBinaryNamestring
183+
updatedBinaryName:="coder"
184184
ifu.osF()=="windows" {
185185
updatedBinaryName="coder.exe"
186-
}else {
187-
updatedBinaryName="coder"
188186
}
189187
updatedBinary,err:=extractFromArchive(updatedBinaryName,downloadBuf.Bytes())
190188
iferr!=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-
funcassertAdmin(t*testing.T,users []coder.User) {
25+
funcassertCICD(t*testing.T,users []coder.User) {
2626
for_,u:=rangeusers {
27-
ifu.Username=="admin" {
27+
ifu.Username=="cicd" {
2828
return
2929
}
3030
}
31-
slogtest.Fatal(t,"did not findadmin user",slog.F("users",users))
31+
slogtest.Fatal(t,"did not findcicd user",slog.F("users",users))
3232
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp