Skip to content

Commit

Permalink
fix test race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
alixander committed Jun 7, 2023
1 parent 686198e commit 0bd11c4
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 6 deletions.
18 changes: 12 additions & 6 deletions e2etests-cli/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,18 @@ steps: {
writeFile(t, dir, "y.d2", `meow`)
err := runTestMain(t, ctx, dir, env, filepath.Join(dir, "hello-world.d2"))
assert.Success(t, err)
svg := readFile(t, dir, "hello-world/x/y.svg")
assert.Testdata(t, ".svg", svg)
svg = readFile(t, dir, "hello-world/x/index.svg")
assert.Testdata(t, ".svg", svg)
svg = readFile(t, dir, "hello-world/index.svg")
assert.Testdata(t, ".svg", svg)
t.Run("hello-world-x-y", func(t *testing.T) {
svg := readFile(t, dir, "hello-world/x/y.svg")
assert.Testdata(t, ".svg", svg)
})
t.Run("hello-world-x", func(t *testing.T) {
svg := readFile(t, dir, "hello-world/x/index.svg")
assert.Testdata(t, ".svg", svg)
})
t.Run("hello-world", func(t *testing.T) {
svg := readFile(t, dir, "hello-world/index.svg")
assert.Testdata(t, ".svg", svg)
})
},
},
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0bd11c4

Please sign in to comment.