Skip to content

Commit

Permalink
Use '.' in the loader test replacing context
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward J committed Jun 18, 2024
1 parent 2d3bc5c commit 581c9cb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pkg/cli/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestLoader(t *testing.T) {

// Replace the absolute path in context to make the .golden file portable
absPath, _ := filepath.Abs(path)
yaml = bytes.ReplaceAll(yaml, []byte(filepath.Dir(absPath)), []byte(path))
yaml = bytes.ReplaceAll(yaml, []byte(filepath.Dir(absPath)), []byte{'.'})

golden, err := os.ReadFile(path + ".golden")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/alttestproj/compose.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: tests
services:
dfnx:
build:
context: ../../tests/alttestproj/compose.yaml
context: .
dockerfile: Dockerfile
args:
DNS: dfnx
Expand Down
2 changes: 1 addition & 1 deletion src/tests/emptyenv/compose.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: emptyenv
services:
emptyenv:
build:
context: ../../tests/emptyenv/compose.yaml
context: .
dockerfile: Dockerfile
args:
ARG2: ""
Expand Down
2 changes: 1 addition & 1 deletion src/tests/secretname/compose.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: secretname
services:
app:
build:
context: ../../tests/secretname/compose.yaml
context: .
dockerfile: Dockerfile
networks:
default: null
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testproj/compose.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: tests
services:
dfnx:
build:
context: ../../tests/testproj/compose.yaml
context: .
dockerfile: Dockerfile
args:
DNS: dfnx
Expand Down

0 comments on commit 581c9cb

Please sign in to comment.