slachiewicz opened a new pull request, #933:
URL: https://github.com/apache/maven-wagon/pull/933
Backport of #931. This branch's copy was byte-identical to master's before
its migration, so master's
result is taken verbatim; the pom drift between the branches is only the
version line, so the three
dependencies are replayed rather than the file lifted.
Unlike the other providers migrated so far, this one genuinely needs a
container. `AbstractJschWagon`
declares `knownHostsProvider` \(`@Named("file")`\), `interactiveUserInfo`
and `uIKeyboardInteractive`
with `@Inject`; constructing the wagon directly would leave all three null
and the test would keep
passing while exercising something different. Hence `plexus-testing` with
`@Inject @Named("scp")`, and
`PlexusTestConfiguration` to carry over the `SCANNING_INDEX` setting the
sisu-annotated providers need.
`wagon-ssh` also gains `junit-vintage-engine`: `ScpWagonTest`,
`SftpWagonTest`,
`EmbeddedScpWagonWithKeyTest`, `SshCommandExecutorTest` and
`ScpWagonWithSshPrivateKeySearchTest` still
inherit their test methods from the published `WagonTestCase`.
### Verification, including its limit
This module excludes every one of its test classes from surefire —
`**/ScpWagon*Test.*` covers this
one — so `mvn test` in `wagon-ssh` runs nothing and reports success either
way. Passing `-Dtest`
overrides the exclusion, which makes a real comparison possible on this
branch:
| | cases | errors | failures |
|---|---|---|---|
| before | 2 | 0 | 2 |
| after | 2 | 0 | 2 |
Identical, matching what #931 measured on master. Both fail on
`assertTrue(handled)` because the proxy
is never reached without an ssh server present, which is what the exclusions
exist for.
That identity is also the evidence that the injection works: had `@Inject
@Named("scp")` not resolved,
the run would have produced NPE **errors**, not the same two assertion
**failures** — the test only
reaches that assertion after `wagon.connect(...)` has thrown
`AuthenticationException`.
*This change was created with AI assistance.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]