File tree 3 files changed +30
-1
lines changed 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 54
54
db_file=" /tmp/site_${extension} .sqlite"
55
55
56
56
info " Installing Drupal into SQLite database ${db_file} ."
57
- drush sql:drop -y || true > /dev/null
57
+ db_status=$( drush status --field=db-status)
58
+ if [ " ${db_status} " = " Connected" ]; then
59
+ drush sql:drop -y || true > /dev/null
60
+ fi
58
61
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
59
62
60
63
pass " Drupal installed."
Original file line number Diff line number Diff line change @@ -62,6 +62,19 @@ export BATS_FIXTURE_EXPORT_CODEBASE_ENABLED=1
62
62
assert_output_contains " ENVIRONMENT STOPPED"
63
63
}
64
64
65
+ @test " ahoy provision" {
66
+ run ahoy assemble
67
+ run ahoy start
68
+ run ahoy provision
69
+ assert_success
70
+ assert_output_contains " PROVISION COMPLETE"
71
+ assert_output_not_contains " Do you really want to drop all tables in the database"
72
+ run ahoy provision
73
+ assert_success
74
+ assert_output_contains " PROVISION COMPLETE"
75
+ assert_output_contains " Do you really want to drop all tables in the database"
76
+ }
77
+
65
78
@test " ahoy build - basic workflow" {
66
79
run ahoy build
67
80
assert_success
Original file line number Diff line number Diff line change @@ -68,6 +68,19 @@ export BATS_FIXTURE_EXPORT_CODEBASE_ENABLED=1
68
68
assert_output_contains " ENVIRONMENT STOPPED"
69
69
}
70
70
71
+ @test " make provision" {
72
+ run make assemble
73
+ run make start
74
+ run make provision
75
+ assert_success
76
+ assert_output_contains " PROVISION COMPLETE"
77
+ assert_output_not_contains " Do you really want to drop all tables in the database"
78
+ run make provision
79
+ assert_success
80
+ assert_output_contains " PROVISION COMPLETE"
81
+ assert_output_contains " Do you really want to drop all tables in the database"
82
+ }
83
+
71
84
@test " make build - basic workflow" {
72
85
run make build
73
86
assert_success
You can’t perform that action at this time.
0 commit comments