Skip to content

Commit c330baa

Browse files
authored
Merge pull request #21 from olenagerasimova/19-logging-test
fix: correct test with plugin from central
2 parents 96396b7 + dbf6ecc commit c330baa

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

Diff for: mvn-resolver-transport-http3/src/test/java/com/artipie/aether/transport/http3/ArtipieAndPluginFromCentralIT.java

+15-21
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
*/
2626
public class ArtipieAndPluginFromCentralIT {
2727

28-
private static final Logger LOGGER =
29-
LoggerFactory.getLogger(ArtipieAndPluginFromCentralIT.class);
30-
3128
private GenericContainer<?> mavenClient;
3229

3330
private GenericContainer<?> artipie;
@@ -79,19 +76,18 @@ void buildsWithMavenProfile() throws IOException, InterruptedException {
7976
this.putClasspathResourceToClient("ArtipieAndPluginFromCentralIT/com/example/test-maven-profile/maven-settings.xml", "/w/settings.xml");
8077
this.putClasspathResourceToClient("ArtipieAndPluginFromCentralIT/com/example/test-maven-profile/pom.xml", "/w/pom.xml");
8178
final Container.ExecResult exec = this.mavenClient.execInContainer(
82-
"mvn", "install", "-DskipTests", "-s", "settings.xml", "-Daether.connector.https.securityMode=insecure"
79+
"mvn", "install", "-X", "-DskipTests", "-s", "settings.xml", "-Daether.connector.https.securityMode=insecure"
8380
);
8481
String res = String.join("\n", exec.getStdout(), exec.getStderr());
85-
LOGGER.info(res);
8682
MatcherAssert.assertThat("Maven install status is not successful", exec.getExitCode() == 0);
8783
MatcherAssert.assertThat(
8884
res,
8985
Matchers.stringContainsInOrder(
9086
"Downloaded from central: https://repo.maven.apache.org/maven2/com/artipie/maven/resolver/maven-resolver-transport-http3",
91-
"BUILD SUCCESS",
92-
"Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar",
93-
"Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar",
94-
"Request over HTTP/1.1 done, method=GET, resp status=200, url=https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom"
87+
"HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar",
88+
"HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar",
89+
"HTTP/1.1 request done, method=GET, resp status=200, url=https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom",
90+
"BUILD SUCCESS"
9591
)
9692
);
9793
}
@@ -104,19 +100,18 @@ void buildsWithMavenProfile() throws IOException, InterruptedException {
104100
void buildsWithPomRepo() throws IOException, InterruptedException {
105101
this.putClasspathResourceToClient("ArtipieAndPluginFromCentralIT/com/example/test-pom-repo/pom.xml", "/w/pom.xml");
106102
final Container.ExecResult exec = this.mavenClient.execInContainer(
107-
"mvn", "install", "-Daether.connector.https.securityMode=insecure"
103+
"mvn", "install", "-X", "-Daether.connector.https.securityMode=insecure"
108104
);
109105
String res = String.join("\n", exec.getStdout(), exec.getStderr());
110-
LOGGER.info(res);
111106
MatcherAssert.assertThat("Maven install status is not successful", exec.getExitCode() == 0);
112107
MatcherAssert.assertThat(
113108
res,
114109
Matchers.stringContainsInOrder(
115110
"Downloaded from central: https://repo.maven.apache.org/maven2/com/artipie/maven/resolver/maven-resolver-transport-http3",
116-
"BUILD SUCCESS",
117-
"Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar",
118-
"Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar",
119-
"Request over HTTP/1.1 done, method=GET, resp status=200, url=https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom"
111+
"HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar",
112+
"HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar",
113+
"HTTP/1.1 request done, method=GET, resp status=200, url=https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom",
114+
"BUILD SUCCESS"
120115
)
121116
);
122117
}
@@ -134,19 +129,18 @@ void buildsWithPomRepo() throws IOException, InterruptedException {
134129
void buildsWithPomPluginRepo() throws IOException, InterruptedException {
135130
this.putClasspathResourceToClient("ArtipieAndPluginFromCentralIT/com/example/test-pom-plugin-repo/pom.xml", "/w/pom.xml");
136131
final Container.ExecResult exec = this.mavenClient.execInContainer(
137-
"mvn", "install", "-Daether.connector.https.securityMode=insecure"
132+
"mvn", "install", "-X", "-Daether.connector.https.securityMode=insecure"
138133
);
139134
String res = String.join("\n", exec.getStdout(), exec.getStderr());
140-
LOGGER.info(res);
141135
MatcherAssert.assertThat("Maven install status is not successful", exec.getExitCode() == 0);
142136
MatcherAssert.assertThat(
143137
res,
144138
Matchers.stringContainsInOrder(
145139
"Downloaded from central: https://repo.maven.apache.org/maven2/com/artipie/maven/resolver/maven-resolver-transport-http3",
146-
"BUILD SUCCESS",
147-
"Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar",
148-
"Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar",
149-
"Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom"
140+
"HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar",
141+
"HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar",
142+
"HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom",
143+
"BUILD SUCCESS"
150144
)
151145
);
152146
}

0 commit comments

Comments
 (0)