-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
move [Nexus] server and queryOpt from route to query params #3792
Conversation
|
const queryParamSchema = Joi.object({ | ||
server: optionalUrl.required(), | ||
queryOpt: Joi.string() | ||
.regex(/(:(?:q|g|a|v|p|c|cn|sha1|from|count|repositoryId|e|r)=[\w-. ]+)+/i) |
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.
This is a stricter regex than the previous one ((:.+?)?
), but is based on the query params that the two Sonatype APIs actually accept (details at the links in the above inline comments).
I can swap this back to the more lenient one if anyone has concerns with this new one
@@ -7,34 +7,34 @@ const t = (module.exports = require('../tester').createServiceTester()) | |||
|
|||
t.create('search release version valid artifact') | |||
.timeout(15000) | |||
.get('/r/https/oss.sonatype.org/com.google.guava/guava.json') | |||
.get('/r/com.google/bitcoinj.json?server=https://oss.sonatype.org') |
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.
Our Nexus tests are notorious for timeout occurrences in the daily test runs. I found using this target was noticeably faster though (~1 second vs. 10-12 seconds)
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 great! Sorry this has been waiting so long!
Closes #3745