Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed unable to load Drupal settings error during provision. #184

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .devtools/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
db_file="/tmp/site_${extension}.sqlite"

info "Installing Drupal into SQLite database ${db_file}."
drush sql:drop -y || true >/dev/null
db_status=$(drush status --field=db-status)
if [ "${db_status}" = "Connected" ]; then
drush sql:drop -y || true >/dev/null

Check warning on line 59 in .devtools/provision.sh

View check run for this annotation

Codecov / codecov/patch

.devtools/provision.sh#L59

Added line #L59 was not covered by tests
fi
drush site-install "${DRUPAL_PROFILE}" -y --db-url="sqlite://localhost/${db_file}" --account-name=admin install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL

pass "Drupal installed."
Expand Down
13 changes: 13 additions & 0 deletions .scaffold/tests/bats/ahoy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ export BATS_FIXTURE_EXPORT_CODEBASE_ENABLED=1
assert_output_contains "ENVIRONMENT STOPPED"
}

@test "ahoy provision" {
run ahoy assemble
run ahoy start
run ahoy provision
assert_success
assert_output_contains "PROVISION COMPLETE"
assert_output_not_contains "Do you really want to drop all tables in the database"
run ahoy provision
assert_success
assert_output_contains "PROVISION COMPLETE"
assert_output_contains "Do you really want to drop all tables in the database"
}

@test "ahoy build - basic workflow" {
run ahoy build
assert_success
Expand Down
13 changes: 13 additions & 0 deletions .scaffold/tests/bats/make.bats
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ export BATS_FIXTURE_EXPORT_CODEBASE_ENABLED=1
assert_output_contains "ENVIRONMENT STOPPED"
}

@test "make provision" {
run make assemble
run make start
run make provision
assert_success
assert_output_contains "PROVISION COMPLETE"
assert_output_not_contains "Do you really want to drop all tables in the database"
run make provision
assert_success
assert_output_contains "PROVISION COMPLETE"
assert_output_contains "Do you really want to drop all tables in the database"
}

@test "make build - basic workflow" {
run make build
assert_success
Expand Down