Skip to content

Commit f547b3c

Browse files
refactor(wanda): test cases and Dockerfiles for 'hello' variants (#369)
Needed for subsequent work that will assume global uniqueness between names Topic: wanda-refactor-hello Signed-off-by: andrew <andrew@anyscale.com> Signed-off-by: andrew <andrew@anyscale.com>
1 parent f9cc669 commit f547b3c

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

wanda/forge_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func TestForge_withHints(t *testing.T) {
172172
t.Fatalf("build: %v", err)
173173
}
174174

175-
const tag = "cr.ray.io/rayproject/hello"
175+
const tag = "cr.ray.io/rayproject/hello-hint"
176176

177177
ref, err := name.ParseReference(tag)
178178
if err != nil {
@@ -214,11 +214,11 @@ func TestForge(t *testing.T) {
214214
NamePrefix: "cr.ray.io/rayproject/",
215215
}
216216

217-
if err := Build("testdata/hello.wanda.yaml", config); err != nil {
217+
if err := Build("testdata/hello-test.wanda.yaml", config); err != nil {
218218
t.Fatalf("build: %v", err)
219219
}
220220

221-
const tag = "cr.ray.io/rayproject/hello"
221+
const tag = "cr.ray.io/rayproject/hello-test"
222222

223223
ref, err := name.ParseReference(tag)
224224
if err != nil {
@@ -283,7 +283,7 @@ func TestForge_noCache(t *testing.T) {
283283
t.Fatalf("build: %v", err)
284284
}
285285

286-
const tag = "cr.ray.io/rayproject/hello"
286+
const tag = "cr.ray.io/rayproject/hello-nocache"
287287

288288
ref, err := name.ParseReference(tag)
289289
if err != nil {
@@ -362,7 +362,7 @@ func TestForgeWithRemoteWorkRepo(t *testing.T) {
362362
Epoch: "1",
363363
}
364364

365-
if err := Build("testdata/hello.wanda.yaml", config); err != nil {
365+
if err := Build("testdata/hello-test.wanda.yaml", config); err != nil {
366366
t.Fatalf("build hello: %v", err)
367367
}
368368

@@ -405,7 +405,7 @@ func TestForgeWithRemoteWorkRepo(t *testing.T) {
405405
t.Fatalf("make new forge: %v", err)
406406
}
407407

408-
helloSpec, err := parseSpecFile("testdata/hello.wanda.yaml")
408+
helloSpec, err := parseSpecFile("testdata/hello-test.wanda.yaml")
409409
if err != nil {
410410
t.Fatalf("parse hello spec: %v", err)
411411
}
@@ -420,7 +420,7 @@ func TestForgeWithRemoteWorkRepo(t *testing.T) {
420420
t.Errorf("got %d cache hits, want 1", hit)
421421
}
422422

423-
hello := fmt.Sprintf("%s/work:def456-hello", crAddr)
423+
hello := fmt.Sprintf("%s/work:def456-hello-test", crAddr)
424424
helloRef, err := name.ParseReference(hello)
425425
if err != nil {
426426
t.Fatalf("parse hello reference: %v", err)
@@ -475,7 +475,7 @@ func TestForgeLocal_withNamePrefix(t *testing.T) {
475475
Epoch: randomEpoch(),
476476
}
477477

478-
if err := Build("testdata/hello.wanda.yaml", config); err != nil {
478+
if err := Build("testdata/hello-test.wanda.yaml", config); err != nil {
479479
t.Fatalf("build hello: %v", err)
480480
}
481481

@@ -518,7 +518,7 @@ func TestForgeLocal_withNamePrefix(t *testing.T) {
518518
t.Fatalf("make new forge: %v", err)
519519
}
520520

521-
helloSpec, err := parseSpecFile("testdata/hello.wanda.yaml")
521+
helloSpec, err := parseSpecFile("testdata/hello-test.wanda.yaml")
522522
if err != nil {
523523
t.Fatalf("parse hello spec: %v", err)
524524
}
@@ -531,7 +531,7 @@ func TestForgeLocal_withNamePrefix(t *testing.T) {
531531
t.Errorf("got %d cache hits, want 1", hit)
532532
}
533533

534-
hello := "localhost:5000/rayci-work:abc123-hello"
534+
hello := "localhost:5000/rayci-work:abc123-hello-test"
535535
helloRef, err := name.ParseReference(hello)
536536
if err != nil {
537537
t.Fatalf("parse hello reference: %v", err)

wanda/testdata/Dockerfile.world

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM cr.ray.io/rayproject/hello
1+
FROM cr.ray.io/rayproject/hello-test
22

33
COPY world.txt /opt/app/world.txt
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: hello
1+
name: hello-hint
22
dockerfile: Dockerfile.hello
33
build_hint_args:
44
- MESSAGE=hint message
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
name: hello
1+
name: hello-nocache
22
dockerfile: Dockerfile.hello
33
disable_caching: true
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
name: hello
1+
name: hello-test
22
dockerfile: Dockerfile.hello

wanda/testdata/world.wanda.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: world
22
dockerfile: Dockerfile.world
3-
froms: [ "cr.ray.io/rayproject/hello" ]
3+
froms: [ "cr.ray.io/rayproject/hello-test" ]
44
srcs:
55
- world.txt

0 commit comments

Comments
 (0)