-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
test: Add bats test coverage for Drupal Core and Drupal CMS quickstarts #6893
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ee60636
Load bats-file in common-setup.bash
rpkoller 548af64
move two drupal cms quickstarts into separate box within drupal section
rpkoller ce7b521
initial draft for testing quickstarts for drupal
rpkoller 0bd425c
add ddev start to the quickstarts where it is missing
rpkoller 409c351
change the directory name to my-drupal-site on the drupal cms compose…
rpkoller 7529b43
remove empty line to mind linter recommendation
rpkoller 709c8c5
add ddev_debug for the launch-drupal-cms.sh script execution
rpkoller e81d926
wrap ddev_debug launch script in run bash statement like the ddev_deb…
rpkoller d10ab89
Fix the case for the tab label Zip File
rpkoller 6457d47
Make Core in Drupal Core upper case
rpkoller 29f956c
includes feedback, add missing ddev start statements, improved consis…
rpkoller 1e159f6
fix the url for the drupal cms curl zip download
rpkoller 9d2ea03
and uncomment other tests again, was too overeager pushing
rpkoller 07c4a21
adjust the corresponding quickstart to the change
rpkoller 1907fb0
fixing consistency detail between tests and quickstart
rpkoller 1034dc8
update quickstarts and ZIP dl link to stable 1.0.0
rpkoller 37f1ae2
add a missing whitespace for alignment
rpkoller 616c17f
skip the zip based bats test until a fix is in
rpkoller 16489f8
add links to marketing site and docs for core and cms
rpkoller 7a91123
fix the the styling and syntax of the previously added links
rpkoller 9690a2e
forgot to update the link style and syntax on one tab
rpkoller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
#!/usr/bin/env bats | ||
|
||
setup() { | ||
PROJNAME=my-drupal-site | ||
load 'common-setup' | ||
_common_setup | ||
} | ||
|
||
# executed after each test | ||
teardown() { | ||
_common_teardown | ||
} | ||
|
||
@test "Drupal 11 quickstart with $(ddev --version)" { | ||
# mkdir my-drupal-site && cd my-drupal-site | ||
run mkdir my-drupal-site && cd my-drupal-site | ||
assert_success | ||
# ddev config --project-type=drupal11 --docroot=web | ||
run ddev config --project-type=drupal11 --docroot=web | ||
assert_success | ||
# ddev start | ||
run ddev start | ||
assert_success | ||
# ddev composer create drupal/recommended-project:^11 | ||
run ddev composer create drupal/recommended-project:^11 | ||
assert_success | ||
# ddev composer require drush/drush | ||
run ddev composer require drush/drush | ||
assert_success | ||
#ddev drush site:install --account-name=admin --account-pass=admin -y | ||
run ddev drush site:install --account-name=admin --account-pass=admin -y | ||
assert_success | ||
# ddev launch | ||
run bash -c "DDEV_DEBUG=true ddev launch" | ||
assert_output "FULLURL https://${PROJNAME}.ddev.site" | ||
assert_success | ||
# validate running project | ||
run curl -sfI https://${PROJNAME}.ddev.site | ||
assert_success | ||
assert_output --partial "x-generator: Drupal 11 (https://www.drupal.org)" | ||
assert_output --partial "HTTP/2 200" | ||
} | ||
|
||
@test "Drupal 10 quickstart with $(ddev --version)" { | ||
# mkdir my-drupal-site && cd my-drupal-site | ||
run mkdir my-drupal-site && cd my-drupal-site | ||
assert_success | ||
# ddev config --project-type=drupal10 --docroot=web | ||
run ddev config --project-type=drupal10 --docroot=web | ||
assert_success | ||
# ddev start | ||
run ddev start | ||
assert_success | ||
# ddev composer create drupal/recommended-project:^10 | ||
run ddev composer create drupal/recommended-project:^10 | ||
assert_success | ||
# ddev composer require drush/drush | ||
run ddev composer require drush/drush | ||
assert_success | ||
#ddev drush site:install --account-name=admin --account-pass=admin -y | ||
run ddev drush site:install --account-name=admin --account-pass=admin -y | ||
assert_success | ||
# ddev launch | ||
run bash -c "DDEV_DEBUG=true ddev launch" | ||
assert_output "FULLURL https://${PROJNAME}.ddev.site" | ||
assert_success | ||
# validate running project | ||
run curl -sfI https://${PROJNAME}.ddev.site | ||
assert_success | ||
assert_output --partial "x-generator: Drupal 10 (https://www.drupal.org)" | ||
assert_output --partial "HTTP/2 200" | ||
} | ||
|
||
@test "Drupal 11 git based quickstart with $(ddev --version)" { | ||
# PROJECT_GIT_URL=https://github.com/ddev/test-drupal11.git | ||
PROJECT_GIT_URL=https://github.com/ddev/test-drupal11.git | ||
# git clone ${PROJECT_GIT_URL} ${PROJNAME} | ||
run git clone ${PROJECT_GIT_URL} ${PROJNAME} | ||
assert_success | ||
# cd my-drupal-site | ||
cd ${PROJNAME} || exit 2 | ||
assert_success | ||
# ddev config --project-type=drupal11 --docroot=web | ||
run ddev config --project-type=drupal11 --docroot=web | ||
assert_success | ||
# ddev start | ||
run ddev start | ||
assert_success | ||
# ddev composer install | ||
run ddev composer install | ||
assert_success | ||
#ddev drush site:install --account-name=admin --account-pass=admin -y | ||
run ddev drush site:install --account-name=admin --account-pass=admin -y | ||
assert_success | ||
# ddev launch | ||
run bash -c "DDEV_DEBUG=true ddev launch" | ||
assert_output "FULLURL https://${PROJNAME}.ddev.site" | ||
assert_success | ||
# validate running project | ||
run curl -sfI https://${PROJNAME}.ddev.site | ||
assert_success | ||
assert_output --partial "x-generator: Drupal 11 (https://www.drupal.org)" | ||
assert_output --partial "HTTP/2 200" | ||
} | ||
|
||
@test "Drupal CMS composer quickstart with $(ddev --version)" { | ||
# mkdir my-drupal-site && cd my-drupal-site | ||
run mkdir my-drupal-site && cd my-drupal-site | ||
assert_success | ||
# ddev config --project-type=drupal11 --docroot=web | ||
run ddev config --project-type=drupal11 --docroot=web | ||
assert_success | ||
# ddev start | ||
run ddev start | ||
assert_success | ||
# ddev composer create drupal/cms | ||
run ddev composer create drupal/cms | ||
assert_success | ||
# ddev launch | ||
run bash -c "DDEV_DEBUG=true ddev launch" | ||
assert_output "FULLURL https://${PROJNAME}.ddev.site" | ||
assert_success | ||
# validate running project | ||
run curl -sfI https://${PROJNAME}.ddev.site | ||
assert_success | ||
assert_output --partial "location: /core/install.php" | ||
assert_output --partial "HTTP/2 302" | ||
assert_output --partial "x-generator: Drupal 11 (https://www.drupal.org)" | ||
} | ||
|
||
@test "Drupal CMS zip file quickstart with $(ddev --version)" { | ||
skip "Skipping until script doesn't erroneously create a -1 on project name" | ||
# CMS_VERSION=1.0.0 | ||
CMS_VERSION=1.0.0 | ||
# curl -o my-drupal-site.zip -fL https://ftp.drupal.org/files/projects/cms-1.0.0-${CMS_VERSION}.zip | ||
run curl -o my-drupal-site.zip -fL https://ftp.drupal.org/files/projects/cms-${CMS_VERSION}.zip | ||
assert_success | ||
# unzip my-drupal-cms-zip.zip && rm my-drupal-cms-zip.zip | ||
run unzip my-drupal-site.zip && rm my-drupal-site.zip | ||
assert_success | ||
# mv drupal-cms my-drupal-site | ||
# (Not contained in quickstart but necessary to use PROJNAME in this test ) | ||
run mv drupal-cms my-drupal-site | ||
assert_success | ||
# Change directory | ||
cd ${tmpdir}/${PROJNAME} | ||
assert_success | ||
# execute launch script | ||
run bash -c "DDEV_DEBUG=true ./launch-drupal-cms.sh" | ||
assert_success | ||
# ddev launch | ||
run bash -c "DDEV_DEBUG=true ddev launch" | ||
assert_output "FULLURL https://${PROJNAME}.ddev.site" | ||
assert_success | ||
# validate running project | ||
run curl -sfI https://${PROJNAME}.ddev.site | ||
assert_success | ||
assert_output --partial "location: /core/install.php" | ||
assert_output --partial "HTTP/2 302" | ||
assert_output --partial "x-generator: Drupal 11 (https://www.drupal.org)" | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to ask if we use the repositories from ddev org for
Git Clone
?I'm asking because typo3 PR #6895 didn't have this change in the quickstart docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhhhhhhh why the typo3 quickstart isnt using test-typo.git,i thought i've changed that?! then the typo3 quickstart needs that small update as well. how could i have missed that? i am puzzled. thank you for noticing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will quickly open another PR fixing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for reference, opened #6904
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's not fundamentally important to use
.git
. I never do when cloning a repo.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't know that, but i just tried to be explicit and follow what is provided in the core button. that is what i always followed.