use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class VertxMainITCase method startsWhenNotValidRepoConfigsArePresent.
@Test
void startsWhenNotValidRepoConfigsArePresent() throws IOException {
this.deployment.putBinaryToArtipie("artipie-invalid-repo-config", "Hello world".getBytes(), "/var/artipie/data/my-file/item.txt");
this.deployment.assertExec("Artipie started and responding 200", new ContainerResultMatcher(ContainerResultMatcher.SUCCESS, new StringContains("HTTP/1.1 500 Internal Server Error")), "curl", "-i", "-X", "GET", "http://artipie-invalid-repo-config:8080/my-file/item.txt");
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class DebianITCase method setUp.
@BeforeEach
void setUp() throws IOException {
this.containers.assertExec("Apt-get update failed", new ContainerResultMatcher(), "apt-get", "update");
this.containers.assertExec("Failed to install curl", new ContainerResultMatcher(), "apt-get", "install", "-y", "curl");
this.containers.assertExec("Failed to move debian sources.list", new ContainerResultMatcher(), "mv", "/w/sources.list", "/etc/apt/");
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class DebianITCase method pushAndInstallWorks.
@Test
void pushAndInstallWorks() throws Exception {
this.containers.assertExec("Failed to upload deb package", new ContainerResultMatcher(), "curl", "http://artipie:8080/my-debian/main/aglfn_1.7-3_amd64.deb", "--upload-file", "/w/aglfn_1.7-3_amd64.deb");
this.containers.assertExec("Apt-get update failed", new ContainerResultMatcher(), "apt-get", "update");
this.containers.assertExec("Package was not downloaded and unpacked", new ContainerResultMatcher(new IsEqual<>(0), new StringContainsInOrder(new ListOf<>("Unpacking aglfn", "Setting up aglfn"))), "apt-get", "install", "-y", "aglfn");
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class CondaITCase method init.
@BeforeEach
void init() throws IOException {
this.containers.assertExec("Conda-build install failed", new ContainerResultMatcher(), "conda", "install", "-y", "conda-build");
this.containers.assertExec("Conda-verify install failed", new ContainerResultMatcher(), "conda", "install", "-y", "conda-verify");
this.containers.assertExec("Conda-client install failed", new ContainerResultMatcher(), "conda", "install", "-y", "anaconda-client");
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class CondaITCase method canUploadToArtipie.
@Test
void canUploadToArtipie() throws IOException {
this.moveCondarc();
this.containers.assertExec("Failed to set anaconda upload url", new ContainerResultMatcher(), "anaconda", "config", "--set", "url", "http://artipie:8080/my-conda/", "-s");
this.containers.assertExec("Failed to set anaconda upload flag", new ContainerResultMatcher(), "conda", "config", "--set", "anaconda_upload", "yes");
this.containers.assertExec("Login was not successful", new ContainerResultMatcher(), "anaconda", "login", "--username", "any", "--password", "any");
this.containers.assertExec("Package was not installed successfully", new ContainerResultMatcher(new IsEqual<>(0), Matchers.allOf(new StringContains("Using Anaconda API: http://artipie:8080/my-conda/"), // @checkstyle LineLengthCheck (1 line)
new StringContains("Uploading file \"anonymous/example-package/0.0.1/linux-64/example-package-0.0.1-0.tar.bz2\""), new StringContains("Upload complete"))), "conda", "build", "--output-folder", "/w/conda-out/", "/w/example-project/conda/");
this.containers.assertArtipieContent("Package was not uploaded to artipie", "/var/artipie/data/my-conda/linux-64/example-package-0.0.1-0.tar.bz2", new IsNot<>(new IsNull<>()));
this.containers.assertArtipieContent("Package was not uploaded to artipie", "/var/artipie/data/my-conda/linux-64/repodata.json", new IsNot<>(new IsNull<>()));
}
Aggregations