-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
query: Add e2e test for web route prefix #2714
Conversation
Signed-off-by: Prem Kumar <[email protected]>
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.
pretty good so far, @prmsrswt
Signed-off-by: Prem Kumar <[email protected]>
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.
looks good to me :) however, it seems that there are some conflicts that need to be resolved
Signed-off-by: Prem Kumar <[email protected]>
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.
👍 awesome work!
Thanks to thanos-io/thanos#2714, all links in the frontend are now relative. Unfortunately, that means that using `--external-prefix=.` turns `static/x` into `.static/x`, which doesn't exist. We'll fix this here now and then ensure we sanitize this upstream in Thanos. Signed-off-by: Lucas Servén Marín <[email protected]>
Signed-off-by: Prem Kumar [email protected]
Changes
Add a new e2e test scenario for testing route prefix. I used chromedp to test failed network requests. Right now this test would fail, because we are using absolute URLs for static assets in our templates, and hence we get
404 Not Found
. This is because we are still trying to get assets from/static/*
while it should be/{{ routePrefix }}/static/*
as we are using a route prefix.This isn't exactly what we required in #2582 but it serves the same purpose, and is better in some cases. But I think there's still merit in having unit tests for route prefix and similar.
Fixes #2581
Verification
Tested the e2e test by running locally with different scenarios.