getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths() — spring-boot Function Reference
Architecture documentation for the getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths() function in DockerRegistryConfigAuthenticationTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD a58e1038_5568_5aa4_c595_e3e883382d11["getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths()"] c3e7f0d3_50c7_ae54_85ad_da5e677154d9["toString()"] a58e1038_5568_5aa4_c595_e3e883382d11 -->|calls| c3e7f0d3_50c7_ae54_85ad_da5e677154d9 56c6a94a_906f_bea5_18c0_207cf050ae68["of()"] a58e1038_5568_5aa4_c595_e3e883382d11 -->|calls| 56c6a94a_906f_bea5_18c0_207cf050ae68 fbe0e131_bc90_ac8e_a14b_d98f5e367279["mockHelper()"] a58e1038_5568_5aa4_c595_e3e883382d11 -->|calls| fbe0e131_bc90_ac8e_a14b_d98f5e367279 58994152_b05e_a16f_283c_b6dc2c064895["get()"] a58e1038_5568_5aa4_c595_e3e883382d11 -->|calls| 58994152_b05e_a16f_283c_b6dc2c064895 89d1cf4e_05c3_cecb_b45b_6bb19b354798["getAuthHeader()"] a58e1038_5568_5aa4_c595_e3e883382d11 -->|calls| 89d1cf4e_05c3_cecb_b45b_6bb19b354798 8ca19ab7_f79e_e2f8_fdda_f3b17ee41a3e["decode()"] a58e1038_5568_5aa4_c595_e3e883382d11 -->|calls| 8ca19ab7_f79e_e2f8_fdda_f3b17ee41a3e style a58e1038_5568_5aa4_c595_e3e883382d11 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthenticationTests.java lines 260–291
@WithResource(name = "config.json", content = """
{
"auths": {
"gcr.io": {
"auth": "dXNlcm5hbWU6cGFzc3dvcmQ=",
"email": "test@example.com"
}
},
"credsStore": "desktop",
"credHelpers": {
"gcr.io": "gcr"
}
}
""")
@Test
void getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths(@ResourcesRoot Path directory)
throws Exception {
this.environment.put("DOCKER_CONFIG", directory.toString());
ImageReference imageReference = ImageReference.of("gcr.io/ubuntu:latest");
CredentialHelper helper = mockHelper("gcr");
given(helper.get("gcr.io")).willThrow(new IOException("Failed to obtain credentials for registry"));
String authHeader = getAuthHeader(imageReference);
assertThat(authHeader).isNotNull();
assertThat(decode(authHeader)).hasSize(4)
.containsEntry("serveraddress", "gcr.io")
.containsEntry("username", "username")
.containsEntry("password", "password")
.containsEntry("email", "test@example.com");
assertThat(this.helperExceptions).hasSize(1);
assertThat(this.helperExceptions.keySet().iterator().next())
.contains("Error retrieving credentials for 'gcr.io' due to: Failed to obtain credentials for registry");
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths() do?
getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths() is a function in the spring-boot codebase.
What does getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths() call?
getAuthHeaderWhenUsingHelperThatFailsLogsErrorAndReturnsFromAuths() calls 6 function(s): decode, get, getAuthHeader, mockHelper, of, toString.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free