Browse Source

Fix typos

tags/v1.4.0
parent
commit
81fd434e2c
7 changed files with 40 additions and 40 deletions
  1. +2
    -2
      README.md
  2. +1
    -1
      src/main/java/org/perfectable/repositable/SnapshotLocation.java
  3. +1
    -1
      src/main/java/org/perfectable/repositable/repository/FileRepository.java
  4. +11
    -11
      src/test/java/org/perfectable/repositable/FileRepositoryTest.java
  5. +6
    -6
      src/test/java/org/perfectable/repositable/GroupFilterTest.java
  6. +5
    -5
      src/test/java/org/perfectable/repositable/ReleaseFilterTest.java
  7. +14
    -14
      src/test/java/org/perfectable/repositable/VirtualRepositoryTest.java

+ 2
- 2
README.md View File

@@ -4,8 +4,8 @@ Minimalistic Maven Repository Manager.

## Introduction

Repositable is a extremally minimal, but fully-functional maven repository manager. It stores artifacts as files and
generates metadata from thier listing. It is ment to be simple alternative to
Repositable is a extremely minimal, but fully-functional maven repository manager. It stores artifacts as files and
generates metadata from their listing. It is meant to be simple alternative to
[Artifactory](https://www.jfrog.com/artifactory/) or [Nexus](http://www.sonatype.org/nexus/) or
[Archiva](https://archiva.apache.org/), that has no web UI, but consumes much less memory. Its targeted at
individuals that want to code and just publish artifacts.


+ 1
- 1
src/main/java/org/perfectable/repositable/SnapshotLocation.java View File

@@ -14,7 +14,7 @@ import static com.google.common.base.Preconditions.checkState;
public final class SnapshotLocation implements ArtifactLocation {
private static final String REPRESENTATION_FORMAT = "SnapshotLocation(%s, %s, %s)";

// ex. "/libs-snapshot-local/org/perfectable/buildable/1.2.1-SNAPSHOT/buildable-1.2.1-20161022.184306-1.jar" NOPMD
// ex. "/libs-snapshot-local/org/perfectable/buildable/1.2.1-SNAPSHOT/buildable-1.2.1-20161022.184306-1.jar"
static final Pattern PATH_PATTERN =
Pattern.compile("\\/([a-zA-Z-]+)" + // repository
"\\/([a-zA-Z][\\w\\/-]+)" + // groupId


+ 1
- 1
src/main/java/org/perfectable/repositable/repository/FileRepository.java View File

@@ -73,7 +73,7 @@ public final class FileRepository implements Repository {
public void put(ArtifactIdentifier identifier, Artifact artifact, User uploader, HashMethod hashMethod)
throws UnauthorizedUserException, InsertionRejected {
if (hashMethod != HashMethod.NONE) {
return; // dont put hashes into repository
return; // don't put hashes into repository
}
Path artifactPath = identifier.asUploadPath(buildGenerator);
Path absolutePath = location.resolve(artifactPath);


+ 11
- 11
src/test/java/org/perfectable/repositable/FileRepositoryTest.java View File

@@ -259,7 +259,7 @@ public class FileRepositoryTest extends AbstractServerTest {
.isNotFound();
}

private static final String METADATA_RELASE =
private static final String METADATA_RELEASE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
"<metadata>\n" +
" <groupId>org.perfectable.test</groupId>\n" +
@@ -280,10 +280,10 @@ public class FileRepositoryTest extends AbstractServerTest {
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE);
.hasContentXml(METADATA_RELEASE);
}

private static final String METADATA_RELASE_MULTIPLE =
private static final String METADATA_RELEASE_MULTIPLE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
"<metadata>\n" +
" <groupId>org.perfectable.test</groupId>\n" +
@@ -306,7 +306,7 @@ public class FileRepositoryTest extends AbstractServerTest {
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE_MULTIPLE);
.hasContentXml(METADATA_RELEASE_MULTIPLE);
}

@Test
@@ -318,7 +318,7 @@ public class FileRepositoryTest extends AbstractServerTest {
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE_MULTIPLE);
.hasContentXml(METADATA_RELEASE_MULTIPLE);
}

@Test
@@ -331,7 +331,7 @@ public class FileRepositoryTest extends AbstractServerTest {
public void testMetadataReleasePresentMd5() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -343,7 +343,7 @@ public class FileRepositoryTest extends AbstractServerTest {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.2.5/test-artifact-1.2.5.jar", artifactContent);
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE_MULTIPLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE_MULTIPLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -356,7 +356,7 @@ public class FileRepositoryTest extends AbstractServerTest {
createFile("test-content/org/perfectable/test/test-artifact/1.2.5/test-artifact-1.2.5-tests.jar", artifactContent);
createFile("test-content/org/perfectable/test/test-artifact/1.2.5/test-artifact-1.2.5.jar", artifactContent);
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE_MULTIPLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE_MULTIPLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -373,7 +373,7 @@ public class FileRepositoryTest extends AbstractServerTest {
public void testMetadataReleasePresentSha1() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -385,7 +385,7 @@ public class FileRepositoryTest extends AbstractServerTest {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.2.5/test-artifact-1.2.5.jar", artifactContent);
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE_MULTIPLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE_MULTIPLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -398,7 +398,7 @@ public class FileRepositoryTest extends AbstractServerTest {
createFile("test-content/org/perfectable/test/test-artifact/1.2.5/test-artifact-1.2.5-tests.jar", artifactContent);
createFile("test-content/org/perfectable/test/test-artifact/1.2.5/test-artifact-1.2.5.jar", artifactContent);
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE_MULTIPLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE_MULTIPLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))


+ 6
- 6
src/test/java/org/perfectable/repositable/GroupFilterTest.java View File

@@ -74,7 +74,7 @@ public class GroupFilterTest extends AbstractServerTest {
}

@Test
public void testArtifactReleaseMd5PresenMatching() throws IOException {
public void testArtifactReleaseMd5PresentMatching() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/allowed/test-artifact/1.0.0/test-artifact-1.0.0.jar", artifactContent);
String calculatedHash = Hashing.md5().hashBytes(artifactContent).toString();
@@ -190,7 +190,7 @@ public class GroupFilterTest extends AbstractServerTest {
.isNotFound();
}

private static final String METADATA_RELASE =
private static final String METADATA_RELEASE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
"<metadata>\n" +
" <groupId>org.perfectable.allowed</groupId>\n" +
@@ -219,7 +219,7 @@ public class GroupFilterTest extends AbstractServerTest {
assertConnectionTo(createUrl("/test-repository/org/perfectable/allowed/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE);
.hasContentXml(METADATA_RELEASE);
}

@Test
@@ -240,7 +240,7 @@ public class GroupFilterTest extends AbstractServerTest {
public void testMetadataReleasePresentMd5Matching() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/allowed/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/allowed/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -257,7 +257,7 @@ public class GroupFilterTest extends AbstractServerTest {
public void testMetadataReleasePresentSha1NotMatching() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.isNotFound();
}
@@ -266,7 +266,7 @@ public class GroupFilterTest extends AbstractServerTest {
public void testMetadataReleasePresentSha1Matching() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/allowed/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/allowed/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))


+ 5
- 5
src/test/java/org/perfectable/repositable/ReleaseFilterTest.java View File

@@ -58,7 +58,7 @@ public class ReleaseFilterTest extends AbstractServerTest {
}

@Test
public void testArtifactReleaseMd5Presen() throws IOException {
public void testArtifactReleaseMd5Present() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.0.0/test-artifact-1.0.0.jar", artifactContent);
String calculatedHash = Hashing.md5().hashBytes(artifactContent).toString();
@@ -134,7 +134,7 @@ public class ReleaseFilterTest extends AbstractServerTest {
.isNotFound();
}

private static final String METADATA_RELASE =
private static final String METADATA_RELEASE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
"<metadata>\n" +
" <groupId>org.perfectable.test</groupId>\n" +
@@ -155,7 +155,7 @@ public class ReleaseFilterTest extends AbstractServerTest {
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE);
.hasContentXml(METADATA_RELEASE);
}

@Test
@@ -168,7 +168,7 @@ public class ReleaseFilterTest extends AbstractServerTest {
public void testMetadataReleasePresentMd5() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -185,7 +185,7 @@ public class ReleaseFilterTest extends AbstractServerTest {
public void testMetadataReleasePresentSha1() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-content/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/test-repository/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))


+ 14
- 14
src/test/java/org/perfectable/repositable/VirtualRepositoryTest.java View File

@@ -282,7 +282,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
.isNotFound();
}

private static final String METADATA_RELASE_SINGLE =
private static final String METADATA_RELEASE_SINGLE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
"<metadata>\n" +
" <groupId>org.perfectable.test</groupId>\n" +
@@ -303,7 +303,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE_SINGLE);
.hasContentXml(METADATA_RELEASE_SINGLE);
}

@Test
@@ -313,7 +313,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE_SINGLE);
.hasContentXml(METADATA_RELEASE_SINGLE);
}

@Test
@@ -325,10 +325,10 @@ public class VirtualRepositoryTest extends AbstractServerTest {
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE_SINGLE);
.hasContentXml(METADATA_RELEASE_SINGLE);
}

private static final String METADATA_RELASE_DOUBLE =
private static final String METADATA_RELEASE_DOUBLE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
"<metadata>\n" +
" <groupId>org.perfectable.test</groupId>\n" +
@@ -352,7 +352,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.XML_UTF_8)
.hasContentXml(METADATA_RELASE_DOUBLE);
.hasContentXml(METADATA_RELEASE_DOUBLE);
}

@Test
@@ -365,7 +365,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
public void testMetadataReleaseMd5PresentIn1() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-1/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE_SINGLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE_SINGLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -376,7 +376,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
public void testMetadataReleaseMd5PresentIn2() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-2/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE_SINGLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE_SINGLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -389,7 +389,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
byte[] artifactContent2 = {2, 5, 2, 120};
createFile("test-1/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent1);
createFile("test-2/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent2);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE_SINGLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE_SINGLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -402,7 +402,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
byte[] artifactContent2 = {2, 5, 2, 120};
createFile("test-1/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent1);
createFile("test-2/org/perfectable/test/test-artifact/1.2.2/test-artifact-1.2.2.jar", artifactContent2);
String calculatedHash = Hashing.md5().hashString(METADATA_RELASE_DOUBLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.md5().hashString(METADATA_RELEASE_DOUBLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.md5"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -419,7 +419,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
public void testMetadataReleaseSha1PresentIn1() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-1/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE_SINGLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE_SINGLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -430,7 +430,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
public void testMetadataReleaseSha1PresentIn2() throws IOException {
byte[] artifactContent = {2, 5, 2, 100};
createFile("test-2/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE_SINGLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE_SINGLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -443,7 +443,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
byte[] artifactContent2 = {2, 5, 2, 120};
createFile("test-1/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent1);
createFile("test-2/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent2);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE_SINGLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE_SINGLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))
@@ -456,7 +456,7 @@ public class VirtualRepositoryTest extends AbstractServerTest {
byte[] artifactContent2 = {2, 5, 2, 120};
createFile("test-1/org/perfectable/test/test-artifact/1.2.1/test-artifact-1.2.1.jar", artifactContent1);
createFile("test-2/org/perfectable/test/test-artifact/1.2.2/test-artifact-1.2.2.jar", artifactContent2);
String calculatedHash = Hashing.sha1().hashString(METADATA_RELASE_DOUBLE, StandardCharsets.UTF_8).toString();
String calculatedHash = Hashing.sha1().hashString(METADATA_RELEASE_DOUBLE, StandardCharsets.UTF_8).toString();
assertConnectionTo(createUrl("/virtual/org/perfectable/test/test-artifact/maven-metadata.xml.sha1"))
.returnedStatus(HttpServletResponse.SC_OK)
.hasContentType(MediaType.create("text", "plain"))


Loading…
Cancel
Save