Merge pull request #3499 from dokku/3491-buildpacks-writing
Ensure the .buildpacks file exists before writing to it
This commit is contained in:
2 files changed
+23
-1
No files matched your search
@@ -26,7 +26,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildpacksPath := path.Join(tmpWorkDir, ".buildpacks")
|
buildpacksPath := path.Join(tmpWorkDir, ".buildpacks")
|
||||||
file, err := os.OpenFile(buildpacksPath, os.O_RDWR|os.O_TRUNC, 0600)
|
file, err := os.OpenFile(buildpacksPath, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.LogFail(fmt.Sprintf("Error writing .buildpacks file: %s", err.Error()))
|
common.LogFail(fmt.Sprintf("Error writing .buildpacks file: %s", err.Error()))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -209,3 +209,25 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_output_not_exists
|
assert_output_not_exists
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(buildpacks) buildpacks deploy" {
|
||||||
|
destroy_app
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
create_app
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku buildpacks:set $TEST_APP https://github.com/heroku/heroku-buildpack-nodejs"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run deploy_app
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
Reference in new issue
Block a user