Skip to content

chore(core): Adds integration testing to the private registry auth feature (DOCKER_AUTH_CONFIG) - #582

Merged
alexanderankin merged 10 commits into
testcontainers:mainfrom
Tranquility2:private_registry_test
May 27, 2024
Merged

chore(core): Adds integration testing to the private registry auth feature (DOCKER_AUTH_CONFIG)#582
alexanderankin merged 10 commits into
testcontainers:mainfrom
Tranquility2:private_registry_test

Conversation

@Tranquility2

Copy link
Copy Markdown
Contributor

Follow up on #566 - Testing using the registry module

@Tranquility2

Copy link
Copy Markdown
ContributorAuthor

Also fiddled with

+fromunittestimportmock+fromdocker.errorsimportNotFoundfromtestcontainers.core.containerimportDockerContainerfromtestcontainers.core.docker_clientimportDockerClientfromtestcontainers.core.waiting_utilsimportwait_container_is_ready+fromtestcontainers.core.configimporttestcontainers_configascfromtestcontainers.registryimportDockerRegistryContainer
@@ -31,8+34,7 @@ deftest_missing_on_private_registry(monkeypatch):
# prepare auth configcreds: bytes=base64.b64encode(f"{username}:{password}".encode("utf-8"))
config= {"auths": {f"{registry_url}": {"auth": creds.decode("utf-8")}}}
-monkeypatch.setenv("DOCKER_AUTH_CONFIG", json.dumps(config))
-assertos.environ.get("DOCKER_AUTH_CONFIG"), "DOCKER_AUTH_CONFIG not set"+mock.patch.object(c, "_docker_auth_config", json.dumps(config))

@alexanderankinalexanderankin changed the title Private registry (integration Testing)chore(core): Private registry (integration Testing)May 27, 2024
@alexanderankinalexanderankin changed the title chore(core): Private registry (integration Testing)chore(core): Adds integration testing to the private registry auth feature (DOCKER_AUTH_CONFIG)May 27, 2024
@alexanderankin
alexanderankin merged commit 78b6f0e into testcontainers:mainMay 27, 2024
@Tranquility2

Copy link
Copy Markdown
ContributorAuthor

Nicely done @alexanderankin , thank you 🙏

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Tranquility2@alexanderankin