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

Compare different paths on different domains #552

Closed
huang-jy opened this issue Jan 5, 2018 · 3 comments
Closed

Compare different paths on different domains #552

huang-jy opened this issue Jan 5, 2018 · 3 comments

Comments

@huang-jy
Copy link

huang-jy commented Jan 5, 2018

Wraith relies on the same path on both domains. However, we have a use case where the same page has a different path from server A compared to server B, yet we still want to compare the two.

For example, you may have a page at a CMS (server A) which is available at

http://servera/internal/finance/ready/homepage.html

But when it's on the external, internet-facing server, the path is rewritten. For example, like this

http://serverb/finance/

Even though these two are the same page, but with different paths, wraith can't compare the two using the capture command as it will show a 404 on one of the servers depending on which value we use for the path clause.

Is there a way we can do this?

@huang-jy
Copy link
Author

huang-jy commented Jan 9, 2018

I found one way of doing this, and that is to "bounce" the request via an nginx docker container, that produces a redirect to the other path. Seems overkill for something that can be done within Wraith...

stevenday pushed a commit to CityScience/wraith that referenced this issue Sep 10, 2018
This adds the option to supply two different paths for particular pages,
for instances where the url changes between domains (e.g. testing a
migration to a new slug library or a new CMS).

Closes bbc#552
stevenday pushed a commit to CityScience/wraith that referenced this issue Sep 10, 2018
This adds the option to supply two different paths for particular pages,
for instances where the path changes between domains (e.g. testing a
migration to a new slug library or a new CMS).

Closes bbc#552
@pivica
Copy link

pivica commented Sep 20, 2018

Add base_path and compare_path options for paths #585

If somebody is interested in this, on top of above great patch from @stevenday, the next very basic patch from https://gist.github.com/pivica/56014df4a0c6054c2f4d6c0a3abfbc35 adds support for base_path and compare_path selectors like:

paths:
  different-source-and-target:
    base_path:             /source-path
    base_path_selector:    ".source-path-selector"
    compare_path:          /different-target-path
    compare_path_selector: ".compare-path-selector"

@huang-jy
Copy link
Author

I'm still interested in this -- though I haven't had much chance to test Wraith recently.

@huang-jy huang-jy closed this as completed Dec 2, 2019
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

No branches or pull requests

2 participants