Skip to content

Commit

Permalink
Run python3 -m venv as a test
Browse files Browse the repository at this point in the history
  • Loading branch information
justinvp committed May 16, 2024
1 parent 6e7a0ec commit 2b415a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docker/pulumi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ ARG PULUMI_VERSION
RUN curl -fsSL https://get.pulumi.com/ | bash -s -- --version $PULUMI_VERSION && \
mv ~/.pulumi/bin/* /usr/bin

RUN python3 -m venv /tmp/venv

# I think it's safe to say if we're using this mega image, we want pulumi
ENTRYPOINT ["pulumi"]

# Temp: force CI to run

# Pulumi Bridged Terraform Provider Build Environment
#
# Bundles together everything needed to build a Terraform-based
Expand Down
14 changes: 13 additions & 1 deletion tests/containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package containers
import (
"fmt"
"os"
"path/filepath"
"strings"
"testing"
"time"
Expand All @@ -36,7 +37,7 @@ func TestPulumiDockerImage(t *testing.T) {
t.Fatal("PULUMI_ACCESS_TOKEN not found, aborting tests.")
}

var stackOwner = os.Getenv("PULUMI_ORG")
stackOwner := os.Getenv("PULUMI_ORG")
if stackOwner == "" {
t.Fatal("PULUMI_ORG must be set. Aborting tests.")
}
Expand Down Expand Up @@ -74,4 +75,15 @@ func TestPulumiDockerImage(t *testing.T) {
integration.ProgramTest(t, &example)
})
}

t.Run("python venv", func(t *testing.T) {
t.Parallel()

e := ptesting.NewEnvironment(t)
defer func() {
e.DeleteEnvironment()
}()

e.RunCommand("python3", "-m", "venv", filepath.Join(e.RootPath, "venv"))
})
}

0 comments on commit 2b415a6

Please sign in to comment.