/
registry_providers.robot
77 lines (65 loc) 路 2.92 KB
/
registry_providers.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
*** Settings ***
Documentation Tests to verify that docker-credential-magic/magician works properly
... against various commercial registry providers (Docker required).
Library String
Library OperatingSystem
Library lib/Sh.py
Suite Setup Suite Setup
Suite Teardown Suite Teardown
*** Test Cases ***
Azure Container Registry (ACR)
Cleanup envfile
Skip test or add to envfile AZURE_REGISTRY_ENDPOINT REGISTRY_ENDPOINT
Skip test or add to envfile AZURE_REGISTRY_NAMESPACE REGISTRY_NAMESPACE
Skip test or add to envfile AZURE_CLIENT_ID
Skip test or add to envfile AZURE_CLIENT_SECRET
Skip test or add to envfile AZURE_TENANT_ID
Test registry provider integration
Amazon Elastic Container Registry (ECR)
Cleanup envfile
Skip test or add to envfile AWS_REGISTRY_ENDPOINT REGISTRY_ENDPOINT
Skip test or add to envfile AWS_REGISTRY_NAMESPACE REGISTRY_NAMESPACE
Skip test or add to envfile AWS_DEFAULT_REGION
Skip test or add to envfile AWS_ACCESS_KEY_ID
Skip test or add to envfile AWS_SECRET_ACCESS_KEY
Test registry provider integration
Google Container Registry (GCR) / Google Artifact Registry (GAR)
Cleanup envfile
Skip test or add to envfile GOOGLE_REGISTRY_ENDPOINT REGISTRY_ENDPOINT
Skip test or add to envfile GOOGLE_REGISTRY_NAMESPACE REGISTRY_NAMESPACE
Skip test or add to envfile GOOGLE_APPLICATION_CREDENTIALS
Test registry provider integration
*** Keyword ***
Skip test or add to envfile
[Arguments] ${key} ${override_key}=unset
Skip If "%{${key}}" == "" Missing required env var ${key}
IF "${override_key}" != "unset"
Add to envfile "${override_key}" "%{${key}}"
ELSE
Add to envfile "${key}" "%{${key}}"
END
Add to envfile
[Arguments] ${key} ${value}
Should pass no output echo "${key}=${value}" >> test.env
Cleanup envfile
Should pass rm -f test.env || true
Test registry provider integration
Should pass docker run --rm --env-file=test.env --entrypoint %{PUSH_ENTRYPOINT} %{PUSH_MOUNT_FLAGS} %{LOCAL_IMAGE} %{PUSH_ARGS}
Should pass %{POST_PUSH_CMD}
Should pass docker run --rm --env-file=test.env --entrypoint %{PULL_ENTRYPOINT} %{PULL_MOUNT_FLAGS} %{LOCAL_IMAGE} %{PULL_ARGS}
Should pass %{VERIFY_CMD}
Start local test registry
Should pass docker rmi -f %{LOCAL_IMAGE} || true
Should pass docker rm -f %{CONTAINER_NAME} || true
Should pass docker run --rm -d -p %{CONTAINER_PORT}:5000 --name %{CONTAINER_NAME} registry
Stop local test registry
Should pass docker logs %{CONTAINER_NAME}
Should pass docker rm -f %{CONTAINER_NAME}
Mutate remote test image
Should pass docker-credential-magician mutate %{REMOTE_IMAGE} -t %{LOCAL_IMAGE}
Suite Setup
Start local test registry
Mutate remote test image
Suite Teardown
Cleanup envfile
Stop local test registry