Skip to content

Commit

Permalink
Enable running integration tests on Mac OS
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed Oct 12, 2023
1 parent 243609d commit 51e2579
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,24 @@ pip --version || (echo "We need 'pip' intalled to run integration tests"; exit 1
make fmt
make test
go build -o terraform-provider-outscale_v0.5.32
mkdir -p $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/linux_amd64/
cp terraform-provider-outscale_v0.5.32 $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/linux_amd64/
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
mkdir -p $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/linux_amd64/
cp terraform-provider-outscale_v0.5.32 $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/linux_amd64/
elif [[ "$OSTYPE" == "darwin"* ]]; then
case $(uname -m) in
arm64)
mkdir -p $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/darwin_arm64/
cp terraform-provider-outscale_v0.5.32 $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/darwin_arm64/
;;
*)
mkdir -p $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/darwin_amd64/
cp terraform-provider-outscale_v0.5.32 $BUILD_DIR/terraform.d/plugins/registry.terraform.io/outscale/outscale/0.5.32/darwin_amd64/
;;
esac
else
echo "OS $OSTYPE is not supported yet for testing"
exit 1
fi

cd $BUILD_DIR
pip install -r requirements.txt
Expand Down

0 comments on commit 51e2579

Please sign in to comment.