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
refactor(maven): Refactor datasource tests #9745
refactor(maven): Refactor datasource tests #9745
Conversation
import nock from 'nock'; | ||
import { Release, getPkgReleases } from '..'; | ||
import { getName, loadFixture } from '../../../test/util'; | ||
import _fs from 'fs-extra'; |
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.
Isn't the code using our utils/fs
wrapper?
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.
Won't work since maven/util.ts
uses fs-extra
directly
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.
ok, so needs refactored /fixed in separate pr.
…/renovate into refactor/maven-datasource-tests
@@ -339,7 +339,7 @@ Array [ | |||
"user-agent": "https://github.com/renovatebot/renovate", | |||
}, | |||
"method": "GET", | |||
"url": "https://repo.maven.apache.org/maven2/org/example/package/maven-metadata.xml", | |||
"url": "http://repo.maven.apache.org/maven2/org/example/package/maven-metadata.xml", |
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.
??
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.
Intentionally replaced https
to http
for this test. I needed to fix coverage and this test seemed pretty relevant for this.
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.
Instead, probably it would be better to remove HTTP support at all
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.
Wouldn't removing HTTP support break support for internal maven repositories that aren't served via HTTPS?
Like sonatype nexus for example still comes out of the box with http as it's default port.
Other scenarios might see some old references to http:// where the server properly handles a 301 to https
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.
Yes, you're right
🎉 This PR is included in version 25.4.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes:
Use and track HTTP/file mocks instead of relying on file protocol support being used to obtain fixtures.
Context:
Ref: #6742
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: