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

Commitbc7bcb8

Browse files
author
Faris Huskovic
committed
build
1 parent7989398 commitbc7bcb8

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎ci/integration/envs_test.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
// From Coder organization images
12-
constubuntuImgID="5f443b16-30652892427b955601330fa5"
12+
//const ubuntuImgID = "5f443b16-30652892427b955601330fa5"
1313

1414
funcTestEnvsCLI(t*testing.T) {
1515
t.Parallel()
@@ -37,6 +37,18 @@ func TestEnvsCLI(t *testing.T) {
3737
tcli.StderrEmpty(),
3838
)
3939

40+
// Image unset.
41+
c.Run(ctx,"coder envs create test-env").Assert(t,
42+
tcli.StderrMatches(regexp.QuoteMeta("fatal: required flag(s)\"image\" not set")),
43+
tcli.Error(),
44+
)
45+
46+
// Image not imported.
47+
c.Run(ctx,"coder envs create test-env --image doesntmatter").Assert(t,
48+
tcli.StderrMatches(regexp.QuoteMeta("fatal: image not found - did you forget to import this image?")),
49+
tcli.Error(),
50+
)
51+
4052
// TODO(Faris) : uncomment this when we can safely purge the environments
4153
// the integrations tests would create in the sidecar
4254
// Successfully create environment.
@@ -46,24 +58,12 @@ func TestEnvsCLI(t *testing.T) {
4658
// tcli.StderrMatches(regexp.QuoteMeta("Successfully created environment \"test-ubuntu\"")),
4759
// )
4860

49-
// Invalid environment name should fail.
50-
c.Run(ctx,"coder envs create --org Coder --image "+ubuntuImgID+" this-IS-an-invalid-EnvironmentName").Assert(t,
51-
tcli.Error(),
52-
tcli.StderrMatches(regexp.QuoteMeta("fatal: image not found - did you forget to import this image?")),
53-
)
54-
5561
// TODO(Faris) : uncomment this when we can safely purge the environments
5662
// the integrations tests would create in the sidecar
5763
// Successfully provision environment with fractional resource amounts
5864
// c.Run(ctx, fmt.Sprintf(`coder envs create -i %s -c 1.2 -m 1.4 non-whole-resource-amounts`, ubuntuImgID)).Assert(t,
5965
// tcli.Success(),
6066
// tcli.StderrMatches(regexp.QuoteMeta("Successfully created environment \"non-whole-resource-amounts\"")),
6167
// )
62-
63-
// Image does not exist should fail.
64-
c.Run(ctx,"coder envs create --org Coder --image does-not-exist env-will-not-be-created").Assert(t,
65-
tcli.Error(),
66-
tcli.StderrMatches(regexp.QuoteMeta("fatal: image not found - did you forget to import this image?")),
67-
)
6868
})
6969
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp