-
Notifications
You must be signed in to change notification settings - Fork 983
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
Add unit tests to create and verify base url permutations. #2484
Conversation
19dc8a1
to
551c2f9
Compare
If you rebase is it ok to merge? |
@Keats Good to merge, mate. Cheers. |
} | ||
|
||
#[test] | ||
fn test_create_new_site_with_protocol_without_port_with_mounted_path() { |
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 like this fails on windows?
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.
All the tests were green prior to rebase. The process cannot access the file because it is being used by another process.
This seems like a concurrency issue with the test runner.
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.
Can we try re-running and see if it was transient?
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!
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.
It does fail very often on CI in the end, I'll disable it for windows
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.
Well that's unfortunate. I have a Windows VM I'll see if I can reproduce the failure outside of CI.
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.
It is peculiar if it only fails on the one test you disabled as there are several that are virtually identical, just using slightly different parameters.
I expect the failure to reemerge on the next active test of that type...
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.
Yeah it's weird. I've disabled it so i can release 0.19 but it would be interesting to get some investigation done
Unit tests to verify that a
site::Site
is successfully built and contains valid permalinks using the new base url logic insrc/cmd/serve.rs
introduced in #2311.Closes #2448.
I am marking this as a draft for now.This tests thecreate_new_site
function and verifies the urls and paths,but I'd like to add further tests of the actual live hyper endpoint.Edit: Not sure the hyper endpoint tests are important at this stage.
Note that the tests will fail until this rebased on #2482 as that PR makes the trailing slash behaviour consistent with prior before we added the construct_base_url function.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?If the change is a new feature or adding to/changing an existing one: