Skip to content

Commit

Permalink
fix node-default test
Browse files Browse the repository at this point in the history
  • Loading branch information
julienp committed Aug 29, 2024
1 parent cadd43b commit eaeecde
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,36 @@ func TestKitchenSinkLanguageVersions(t *testing.T) {

dirs, err := testdata.ReadDir("testdata")
require.NoError(t, err)

t.Run("node-default", func(t *testing.T) {
// We need to run the `node-default` test first, before the other tests which modify
// the container's default node version.
p := filepath.Join("testdata", "node-default")
copyTestData(t, p)
integration.ProgramTest(t, &integration.ProgramTestOptions{
NoParallel: true,
Dir: p,
Quick: true,
SkipRefresh: true,
PrepareProject: func(info *engine.Projinfo) error {
cmd := exec.Command("pulumi", "install", "--use-language-version-tools")
cmd.Dir = info.Root
out, err := cmd.CombinedOutput()
if err != nil {
t.Logf("install failed: %s: %s", err, out)
}
return err
},
})
})

for _, dir := range dirs {
dir := dir
t.Run(dir.Name(), func(t *testing.T) {
if strings.HasSuffix(dir.Name(), "node-default") {
// The `node-default` test is run first, so we skip it here.
t.Skip()
}
p := filepath.Join("testdata", dir.Name())
copyTestData(t, p)
integration.ProgramTest(t, &integration.ProgramTestOptions{
Expand Down

0 comments on commit eaeecde

Please sign in to comment.