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

Copy .htaccess file when initilizing multisite on test container. #1143

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

peterwilsoncc
Copy link
Collaborator

@peterwilsoncc peterwilsoncc commented Oct 11, 2023

Description of the Change

Ensures the htaccess file is copied when the test container's Docker environment is converted to multisite.

Closes #

How to test the Change

  1. Start docker
  2. npm run env:destroy to reset the environment
  3. npm run env:start
  4. Visit http://localhost/second/ to ensure you can access the second site on the test environment.

Changelog Entry

Fixed - Copy the htaccess when initilizing the E2E test environment.

Credits

Props @peterwilsoncc, @theskinnyghost, @dkotter.

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@peterwilsoncc peterwilsoncc marked this pull request as ready for review October 11, 2023 04:36
@peterwilsoncc peterwilsoncc requested a review from a team as a code owner October 11, 2023 04:36
@peterwilsoncc peterwilsoncc requested review from dkotter and theskinnyghost and removed request for a team October 11, 2023 04:36
@peterwilsoncc peterwilsoncc self-assigned this Oct 11, 2023
@peterwilsoncc peterwilsoncc added this to the 2.1.0 milestone Oct 11, 2023
theskinnyghost
theskinnyghost previously approved these changes Oct 11, 2023
Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious on why this is needed? I know we already have an npm script that copies the htaccess file before tests are run (see https://github.com/10up/distributor/blob/develop/.github/workflows/cypress.yml#L100 and https://github.com/10up/distributor/blob/develop/package.json#L63) so wondering if that's not working?

@peterwilsoncc
Copy link
Collaborator Author

@dkotter It's for running the tests locally rather than in CI. It allows devs to run npm run env:start; npm run cypress:run locally.

At the moment env:start does the conversion to multisite but misses the step for copying the htaccess file.

@dkotter
Copy link
Collaborator

dkotter commented Oct 11, 2023

@dkotter It's for running the tests locally rather than in CI. It allows devs to run npm run env:start; npm run cypress:run locally.

At the moment env:start does the conversion to multisite but misses the step for copying the htaccess file.

Okay, I guess the question I have then is should we remove the copying of the htaccess file from the cypress.yml file then? I believe at the moment that is happening twice, once as part of the postenv:start command and then again in the cypress.yml file when it runs npm run copy-htaccess. I haven't tested this locally but seems like we can get rid of that second one now.

@peterwilsoncc peterwilsoncc merged commit 92dfda5 into develop Oct 12, 2023
17 checks passed
@peterwilsoncc peterwilsoncc deleted the fix/e2e-init branch October 12, 2023 23:21
@dkotter dkotter modified the milestones: 2.1.0, 2.0.2 Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants