Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamas committed Jan 8, 2025
1 parent f887c33 commit 82133b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void testitMNG3379() throws Exception {
private void assertArtifact(
Verifier verifier, String gid, String aid, String ver, String cls, String ext, String sha1)
throws Exception {
File file = new File(verifier.getArtifactPath(gid, aid, ver, ext, cls));
File file = new File(verifier.getArtifactPath(gid, aid, ver, ext, cls, "maven-core-it"));
assertTrue(file.isFile(), file.getAbsolutePath());
assertEquals(sha1, ItUtils.calcHash(file, "SHA-1"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void testArtifactReplacementExecution() throws Exception {
v0.execute();
v0.verifyErrorFreeLog();

String path = v0.getArtifactPath("org.apache.maven.its.mng5387", "mng5387-it", "0.0.1-SNAPSHOT", "txt", "c");
String path = v0.getArtifactPath("org.apache.maven.its.mng5387", "mng5387-it", "0.0.1-SNAPSHOT", "txt", "c", null);
String contents = Files.readString(new File(path).toPath());
assertTrue(contents.contains("This is the second file"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package org.apache.maven.it;

import java.io.File;
import java.nio.file.Files;

import org.apache.commons.io.FileUtils;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -57,8 +57,9 @@ void testLeakyModel() throws Exception {
if (getMavenVersion().compareTo(new DefaultArtifactVersion("4.0.0-alpha-7")) > 0) {
classifier = "build";
}
String pom = FileUtils.readFileToString(new File(
verifier.getArtifactPath("org.apache.maven.its.mng7228", "test", "1.0.0-SNAPSHOT", "pom", classifier)));
String pom = Files.readString(new File(verifier.getArtifactPath(
"org.apache.maven.its.mng7228", "test", "1.0.0-SNAPSHOT", "pom", classifier, null))
.toPath());

assertThat(pom, containsString("projectProperty"));
assertThat(pom, not(containsString("activeProperty")));
Expand Down

0 comments on commit 82133b2

Please sign in to comment.