-
-
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
Conversation
The Drupal CMS composer test is failing https://github.com/ddev/ddev/actions/runs/12746756015/job/35523444093?pr=6893 ... i thought maybe another commit got in minutes ago. but i've manually tested locally again and it still passes for me. so no idea why is going wrong when the tests run here on github? and one other thought i wonder if it would make sense to add a third quickstart for drupal cms that is not using the installer but instead a drush site install and which provides the command line equivalent how to apply all the optional recipes via the command line. something i struggled and still have to look up each and every time. |
Co-authored-by: Randy Fay <randy@randyfay.com>
docs/content/users/quickstart.md
Outdated
ddev composer install # If a composer build | ||
ddev launch | ||
``` | ||
|
||
### Drupal CMS |
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.
Please add a link to the Drupal CMS pages on drupal.org that are relevant here, especially the tarball download page, etc.
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.
then would drupal core also need necessary links? and there is a tar ball version of drupal cms? i am only aware of the zip file and the composer 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.
would drupal core also need necessary links
It's a good idea to link to the page that the technique is built on, thanks!
and there is a tar ball version of drupal cms
I meant zipball of course
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.
wouldnt the link to the zip be redundant, it is already listed in the quickstart itself? not that i wouldnt do it, i just mean to keep things concise?
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 propose that in every quickstart we link to the basis of the quickstart. We do that in many of them. Drupal can do it as well. It's instructional. We want people to understand why the quickstart is what it is and then they can also perhaps see what's the difference between the upstream install/getting-started docs.
…ug of the launch statement
docs/tests/drupal.bats
Outdated
cd ${tmpdir}/${PROJNAME} | ||
assert_success | ||
# execute launch script | ||
run DDEV_DEBUG=true ./launch-drupal-cms.sh |
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 tried this locally, worked for me:
run DDEV_DEBUG=true ./launch-drupal-cms.sh | |
run env DDEV_DEBUG=true ./launch-drupal-cms.sh |
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'Ve already pushed a change to run bash -c "DDEV_DEBUG=true ddev launch"
the same pattern that is used for the ddev launch asserts. if that fails i can go with the env variant.
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.
@stasadev the tests are green with the run bash -c "DDEV_DEBUG=true ddev launch"
change. should i keep it that way or change to the env approach?
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.
Let's keep it the same as in other places.
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 don't think the text
The legacy type drupal will be interpreted as the latest stable version of Drupal, so in 2024, ddev config --project-type=drupal will configure a Drupal 11 project. drupal can also be used as the project type in the .ddev/config.yaml but it will be interpreted as the latest stable version.
is that useful any more, but open to ideas. Certainly it should say 2025. But it seems out of place here.
Currently "Drupal CMS" is not showing up as a tab on "Drupal" as it should:
Please make "Drupal CMS" part of Drupal. The two options (Composer and Zip) can be shown there inline, or the composer approach can be done in a gist, or whatever.
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.
Thanks for the great work and significant contribution here! This is a great step forward.
docs/tests/drupal.bats
Outdated
assert_output --partial "HTTP/2 200" | ||
} | ||
# Test for the git based quickstart. Has to be uncommented | ||
# as soon as the Drupal test repo is created on GitHub |
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 don't understand about waiting for Drupal test repo, it's been there for some time. https://github.com/ddev/test-drupal11 - if you need some improvement in this, you can have privileges on it or you can request a change.
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.
BTW, rather than commenting it out, use skip
to skip something that's not ready for prime time. That makes it much easier to fix when it's ready.
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.
lol i didnt knew that there is already a testrepo in place! then i would have skipped it. it sounded like that repo would have to be created first. thats why i commented it out. and also didnt knew about the skip command. ;) currently testing the uncommented test and will then push another commit
docs/tests/drupal.bats
Outdated
} | ||
|
||
@test "Drupal CMS zip file quickstart with $(ddev --version)" { | ||
# curl -o my-drupal-site.zip -fL https://ftp.drupal.org/files/projects/cms-1.0.0-rc2.zip |
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.
Same comment, use same exact thing in test as in quickstart.
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.
that was me being lazy. but will do
I consider the detail about the project type
maybe place it even in such an fyi box? |
that was intentional.a single tab with just drupal CMS and having two different approach under one roof felt off. adding a second tab felt also off and the tab got more crowded. strictly speaking the idea is that drupal cms is something "new" and its own "product" so i thought having two boxes felt more clear and cleaned up. but i can change it back later. |
Thanks, please do keep "Drupal CMS" under Drupal. For the |
ok the PR would be ready for another round of review. pushed all changes. all tests are uncommented and working now, applied the feedback, and tried to be consistent. hope i've catched everything |
the to be unzipped archive for drupal cms still had the name drupal-cms... by @stasadev Co-authored-by: Stanislav Zhuk <stasadev@gmail.com>
Let's wait until tomorrow and remove the Drupal CMS tag before pulling. |
which tag you refer to? and tomorrow the tests and quickstarts for drupal cms could be updated with the release of 1.0.0 |
Tomorrow And in |
ahhh that you meant, yep i completely agree then. just wanted to make there wasnt another detail you were referring to and i was missing. |
These look good to me! |
PROJECT_GIT_URL=https://github.com/ddev/test-drupal11.git | ||
git clone ${PROJECT_GIT_URL} my-drupal-site |
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.
by @stasadev Co-authored-by: Stanislav Zhuk <stasadev@gmail.com>
The if [ $n > 0 ]; then
NAME=$NAME-$(expr $n + 1)
fi It should be if [ $n -gt 0 ]; then
NAME=$NAME-$(expr $n + 1)
fi |
Now that Drupal CMS has a web page for installation, please add a link to it at the top, thanks! Ready to go otherwise! |
Confirming the "Drupal CMS" guide, nice update! |
The square brackets are ugly. Could you make it |
This PR is adding tests for Drupal Core and Drupal CMS, updates the drupal quickstarts layout wise and makes a change to the common setup function.
Rendered quickstart: https://ddev--6893.org.readthedocs.build/en/6893/users/quickstart/#drupal
about the tests: i've added a fifth test that is currently commented out. it requires a creation of a test repo in the ddev org on github first (https://github.com/ddev/test-drupal.git would be the same naming pattern used for backdrop). the zip based test for drupal cms contains one additional line that renames the directory. problem is the zip file contains a folder called drupal-cms. due to the fact that launc-drupal-cms.sh contains a ddev config command that makes the project name drupal-cms in consequence and that way the teardown same sas the launch and validate the running project tests are unable to find the default project name my-drupal-site (PROJNAME in line 4)
about the quickstarts: i've added
ddev start
beforeddev composer create
. during the creation of the draft i've noticed that quickstarts are inconsistent some composer based are using ddev start some are not. it should be consistent and @rfay noted that it is always good to educate people with these quickstarts and show them what is actually happening even though forddev composer create
addev start
would be automatically executed. the other change i'Ve made is to add two h3s within the drupal h2 and move the two quickstarts for drupal cms into a seperate tabbed box within the drupal cms h3.about the common-setup.sh: loaded the bats-file library as well that provides some additional asserts and more. based on the instructions from the other PR bats-file is available but was not loaded yet.
IMPORTANT: The PR has to be updated on the 15th of january updating the links related to Drupal CMS with the release of version 1.0.0
The Issue
How This PR Solves The Issue
Manual Testing Instructions
Automated Testing Overview
Release/Deployment Notes