registry test
parent
755733e244
commit
62cdff93df
|
@ -41,6 +41,41 @@ func TestGet(t *testing.T) {
|
|||
fmt.Println(repo.Tags)
|
||||
}
|
||||
|
||||
// https://registry.opensource.zalan.do/v2/teapot/external-dns
|
||||
func TestGetNonDockerRegistryTags(t *testing.T) {
|
||||
client := New()
|
||||
|
||||
repo, err := client.Get(Opts{
|
||||
Registry: "https://registry.opensource.zalan.do",
|
||||
Name: "teapot/external-dns",
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
t.Errorf("error while getting repo: %s", err)
|
||||
}
|
||||
|
||||
fmt.Println(repo.Name)
|
||||
fmt.Println(repo.Tags)
|
||||
}
|
||||
|
||||
func TestGetNonDockerRegistryManifest(t *testing.T) {
|
||||
client := New()
|
||||
|
||||
d, err := client.Digest(Opts{
|
||||
Registry: "https://registry.opensource.zalan.do",
|
||||
Name: "teapot/external-dns",
|
||||
Tag: "v0.4.8",
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
t.Errorf("error while getting repo manifest: %s", err)
|
||||
}
|
||||
|
||||
if d != "sha256:7aa5175f39a7e8a4172972524302c9a8196f681e40d6ee5d2f6bf0ab7d600fee" {
|
||||
t.Errorf("unexpected sha?")
|
||||
}
|
||||
}
|
||||
|
||||
var EnvArtifactoryUsername = "ARTIFACTORY_USERNAME"
|
||||
var EnvArtifactoryPassword = "ARTIFACTORY_PASSWORD"
|
||||
|
||||
|
|
Loading…
Reference in New Issue