Skip to content

Commit 81eaea8

Browse files
authored
Add test for JFrog Artifactory and Quay.io (#272)
2 parents 47a01d7 + d61bb01 commit 81eaea8

3 files changed

Lines changed: 80 additions & 8 deletions

File tree

src/test/java/land/oras/DockerIoITCase.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ void shouldPullAnonymousIndex() {
3131

3232
// FQDN
3333
Registry registry = Registry.builder().build();
34-
// ContainerRef containerRef1 = ContainerRef.parse("docker.io/library/alpine");
35-
// Index index = registry.getIndex(containerRef1);
36-
// assertNotNull(index);
37-
//
38-
// // Default registry
39-
// ContainerRef containerRef2 = ContainerRef.parse("library/alpine");
40-
// Index index2 = registry.getIndex(containerRef2);
41-
// assertNotNull(index2);
34+
ContainerRef containerRef1 = ContainerRef.parse("docker.io/library/alpine");
35+
Index index = registry.getIndex(containerRef1);
36+
assertNotNull(index);
37+
38+
// Default registry
39+
ContainerRef containerRef2 = ContainerRef.parse("library/alpine");
40+
Index index2 = registry.getIndex(containerRef2);
41+
assertNotNull(index2);
4242

4343
// Simple name
4444
ContainerRef containerRef3 = ContainerRef.parse("alpine");
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*-
2+
* =LICENSE=
3+
* ORAS Java SDK
4+
* ===
5+
* Copyright (C) 2024 - 2025 ORAS
6+
* ===
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* =LICENSEEND=
19+
*/
20+
21+
package land.oras;
22+
23+
import static org.junit.jupiter.api.Assertions.assertNotNull;
24+
25+
import org.junit.jupiter.api.Test;
26+
27+
public class JFrogArtifactoryITCase {
28+
29+
@Test
30+
void shouldPull() {
31+
Registry registry = Registry.builder().build();
32+
ContainerRef containerRef1 = ContainerRef.parse("releases-docker.jfrog.io/jfrog/jfrog-cli-v2-jf");
33+
Manifest manifest = registry.getManifest(containerRef1);
34+
assertNotNull(manifest);
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*-
2+
* =LICENSE=
3+
* ORAS Java SDK
4+
* ===
5+
* Copyright (C) 2024 - 2025 ORAS
6+
* ===
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* =LICENSEEND=
19+
*/
20+
21+
package land.oras;
22+
23+
import static org.junit.jupiter.api.Assertions.assertNotNull;
24+
25+
import org.junit.jupiter.api.Test;
26+
27+
public class QuayIoITCase {
28+
29+
@Test
30+
void shouldPull() {
31+
Registry registry = Registry.builder().build();
32+
ContainerRef containerRef1 = ContainerRef.parse("quay.io/openshift/origin-cli:latest");
33+
Index index = registry.getIndex(containerRef1);
34+
assertNotNull(index);
35+
}
36+
}

0 commit comments

Comments
 (0)