mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-21 07:09:48 -05:00
* chore: Adding makefile targets for local building. * fix: Implement proper parsing of different ECR auth mechanisms. * chore: Fix typos and cleanup Makefil [skip ci]
19 lines
476 B
Go
19 lines
476 B
Go
package provider
|
|
|
|
import "testing"
|
|
|
|
func TestIsECRRepositoryURL(t *testing.T) {
|
|
|
|
if !isECRRepositoryURL("2385929435838.dkr.ecr.eu-central-1.amazonaws.com") {
|
|
t.Fatalf("Expected true")
|
|
}
|
|
if !isECRRepositoryURL("39e39fmgvkgd.dkr.ecr.us-east-1.amazonaws.com") {
|
|
t.Fatalf("Expected true")
|
|
}
|
|
if isECRRepositoryURL("39e39fmgvkgd.dkr.ecrus-east-1.amazonaws.com") {
|
|
t.Fatalf("Expected false")
|
|
}
|
|
if !isECRRepositoryURL("public.ecr.aws") {
|
|
t.Fatalf("Expected true")
|
|
}
|
|
}
|