File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
packages/testcontainers/src/container-runtime/auth Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -97,5 +97,22 @@ describe("Auths", () => {
9797 } ;
9898 expect ( await locator . getAuthConfig ( "https://registry.example.com" , containerRuntimeConfig ) ) . toEqual ( authConfig ) ;
9999 } ) ;
100+
101+ it ( "should use identity token when token and user and pass are provided" , async ( ) => {
102+ const containerRuntimeConfig : ContainerRuntimeConfig = {
103+ auths : {
104+ "https://registry.example.com" : {
105+ identitytoken : "token-value" ,
106+ username : "user" ,
107+ password : "pass" ,
108+ } ,
109+ } ,
110+ } ;
111+ const authConfig : AuthConfig = {
112+ identityToken : "token-value" ,
113+ registryAddress : "https://registry.example.com" ,
114+ } ;
115+ expect ( await locator . getAuthConfig ( "https://registry.example.com" , containerRuntimeConfig ) ) . toEqual ( authConfig ) ;
116+ } ) ;
100117 } ) ;
101118} ) ;
You can’t perform that action at this time.
0 commit comments