Skip to content

Commit

Permalink
ts/js local tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Jan 15, 2024
1 parent 0299f4d commit 535e4d2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 5 deletions.
3 changes: 0 additions & 3 deletions examples/python/hello/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import pulumi_cloudinit as cloudinit
import pulumi_outscale as outscale




KEYPAIR = outscale.Keypair(resource_name="hello",
keypair_name="hello-kp")

Expand Down
56 changes: 55 additions & 1 deletion local_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ source venv/bin/activate
pip install pulumi_cloudinit
pip install $GOPATH/sdk/python/


set +e
echo "pulumi stack init staging"
pulumi stack init staging
Expand All @@ -121,4 +120,59 @@ trap "echo [$MSG_BASE python user pulumi down FAIL]" ERR
PATH=$PATH:$GOPATH/bin pulumi down --yes
echo "[$MSG_BASE python user pulumi down OK]"

set -e
deactivate

cd ../hello/

python -m venv venv
source venv/bin/activate

pip install pulumi_cloudinit
pip install $GOPATH/sdk/python/

set +e
echo "pulumi stack init staging"
pulumi stack init staging
pulumi stack select staging
set -e

pulumi config set outscale:secretKeyId $OSC_SECRET_KEY
pulumi config set outscale:accessKeyId $OSC_ACCESS_KEY
pulumi config set outscale:region "eu-west-2"
pulumi config set outscale:insecure true
pulumi config set outscale:endpoints '[{"api": "127.0.0.1:3000"}]'

pip freeze

set -eE

trap "echo [$MSG_BASE python hello pulumi up FAIL]" ERR
PATH=$PATH:$GOPATH/bin pulumi up --yes
echo "[$MSG_BASE python hello pulumi up OK]"
trap "echo [$MSG_BASE python hello pulumi down FAIL]" ERR
PATH=$PATH:$GOPATH/bin pulumi down --yes
echo "[$MSG_BASE python hello pulumi down OK]"

set -e

echo "../../ts/user/"
cd ../../ts/user/


npm install $GOPATH/sdk/nodejs/bin

pulumi config set outscale:secretKeyId $OSC_SECRET_KEY
pulumi config set outscale:accessKeyId $OSC_ACCESS_KEY
pulumi config set outscale:region "eu-west-2"
pulumi config set outscale:insecure true
pulumi config set outscale:endpoints '[{"api": "127.0.0.1:3000"}]'

set -eE

trap "echo [$MSG_BASE ty/js user pulumi up FAIL]" ERR
PATH=$PATH:$GOPATH/bin pulumi up --yes
echo "[$MSG_BASE ty/js user pulumi up OK]"
trap "echo [$MSG_BASE ty/js user pulumi down FAIL]" ERR
PATH=$PATH:$GOPATH/bin pulumi down --yes
echo "[$MSG_BASE ty/js user pulumi down OK]"
2 changes: 1 addition & 1 deletion node_modules/@pulumi/outscale

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 535e4d2

Please sign in to comment.