feat: allow users to enable herokuish usage on arm/arm64 platforms

While the majority of buildpacks do not work on non-amd64 platforms, this will at least allow developers the option to choose when to override this setting.
This commit is contained in:
Jose Diaz-Gonzalez
2022-11-24 14:43:47 -05:00
parent 25beb2af13
commit 1238c8d7e0
10 changed files with 352 additions and 11 deletions

View File

@@ -17,3 +17,74 @@ teardown() {
assert_success
assert_output_contains 'DOTENV_KEY=some_value'
}
@test "(builder-herokuish) builder-herokuish:set allowed" {
if [[ "$(dpkg --print-architecture 2>/dev/null || true)" == "amd64" ]]; then
skip "this test cannot be performed accurately on amd64 as it tests whether we can enable the plugin on armhf/arm64"
fi
run /bin/bash -c "dokku builder-herokuish:set --global allowed"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run deploy_app
echo "output: $output"
echo "status: $status"
assert_failure
run create_app
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-herokuish:set --global allowed true"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run deploy_app
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-herokuish:set --global allowed"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-herokuish:set $TEST_APP allowed true"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku ps:rebuild $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-herokuish:set $TEST_APP allowed"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku ps:rebuild $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_failure
}