use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class CondaITCase method canInstallFromArtipie.
@Test
void canInstallFromArtipie() throws IOException {
this.moveCondarc();
this.containers.putBinaryToArtipie(new TestResource("conda/packages.json").asBytes(), "/var/artipie/data/my-conda/linux-64/repodata.json");
this.containers.putBinaryToArtipie(new TestResource("conda/snappy-1.1.3-0.tar.bz2").asBytes(), "/var/artipie/data/my-conda/linux-64/snappy-1.1.3-0.tar.bz2");
this.containers.assertExec("Package snappy-1.1.3-0 was not installed successfully", new ContainerResultMatcher(new IsEqual<>(0), Matchers.allOf(new StringContains("http://artipie:8080/my-conda"), new StringContains("linux-64::snappy-1.1.3-0"))), "conda", "install", "--verbose", "-y", "snappy");
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class DebianGpgITCase 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 install gnupg", new ContainerResultMatcher(), "apt-get", "install", "-y", "gnupg");
this.containers.assertExec("Failed to add public key to apt-get", new ContainerResultMatcher(), "apt-key", "add", "/w/public-key.asc");
this.containers.putBinaryToClient("deb http://artipie:8080/my-debian my-debian main".getBytes(), "/etc/apt/sources.list");
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class HelmITCase method uploadChartAndCreateIndexYaml.
@Test
void uploadChartAndCreateIndexYaml() throws Exception {
final String url = "http://artipie:8080/my-helm";
this.containers.assertExec("Failed to upload helm archive", new ContainerResultMatcher(new IsEqual<>(0)), "curl", "-X", "PUT", String.format("%s/%s", url, "tomcat"), "--upload-file", String.format("/w/%s", HelmITCase.CHART), "--verbose");
this.containers.assertExec("Init failed", new ContainerResultMatcher(new IsEqual<>(0)), "helm", "init", "--stable-repo-url", url, "--client-only");
this.containers.assertExec("Chart repository was not added", new ContainerResultMatcher(new IsEqual<>(0)), "helm", "repo", "add", "chartrepo", url);
this.containers.assertExec("Repo update from chart repository failed", new ContainerResultMatcher(new IsEqual<>(0), new StringContains("Update Complete.")), "helm", "repo", "update");
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class FileITCase method canUpload.
@Test
void canUpload() throws Exception {
this.deployment.assertExec("Failed to upload", new ContainerResultMatcher(ContainerResultMatcher.SUCCESS), "curl", "-X", "PUT", "--data-binary", "123", "http://artipie:8080/bin/test");
this.deployment.assertArtipieContent("Bad content after upload", "/var/artipie/data/bin/test", Matchers.equalTo("123".getBytes()));
}
use of com.artipie.test.ContainerResultMatcher in project artipie by artipie.
the class FileITCase method canDownload.
@Test
void canDownload() throws Exception {
final byte[] target = new byte[] { 0, 1, 2, 3 };
this.deployment.putBinaryToArtipie(target, "/var/artipie/data/bin/target");
this.deployment.assertExec("Failed to download artifact", new ContainerResultMatcher(ContainerResultMatcher.SUCCESS), "curl", "-X", "GET", "http://artipie:8080/bin/target");
}
Aggregations