Class componenttest.containers.registry.RegistryTest

11

tests

0

failures

0

ignored

0.042s

duration

100%

successful

Tests

Test Duration Result
testExistingDefaultConfig 0.004s passed
testExistingEmptyConfig 0.006s passed
testExistingIncorrectConfig 0.004s passed
testExistingRegistryAuth 0.005s passed
testExistingRegistryAuthAndDefaultConfig 0.004s passed
testExistingRegistryAuthMatched 0.004s passed
testFindExistingConfigResults 0.002s passed
testFindRegistry 0.002s passed
testGenerateAuthToken 0s passed
testMalformedConfigIsFixed 0.005s passed
testNoExisingConfig 0.006s passed

Standard output

### TestName: testNoExisingConfig ###
initial: 

expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	}
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	}
}
### TestName: testExistingEmptyConfig ###
initial: 
{
}
expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	}
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	}
}
### TestName: testExistingDefaultConfig ###
initial: 
{
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
### TestName: testExistingIncorrectConfig ###
initial: 
{
	"auths" : {
		"example.com" : {
			"auth" : "fakeToken987654321",
			"email" : null
		}
	}
}
expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789",
			"email" : null
		}
	}
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789",
			"email" : null
		}
	}
}
### TestName: testExistingRegistryAuth ###
initial: 
{
	"auths" : {
		"fake.com" : {
			"auth" : "fakeToken987654321",
			"email" : null
		}
	}
}
expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		},
		"fake.com" : {
			"auth" : "fakeToken987654321",
			"email" : null
		}
	}
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		},
		"fake.com" : {
			"auth" : "fakeToken987654321",
			"email" : null
		}
	}
}
### TestName: testExistingRegistryAuthAndDefaultConfig ###
initial: 
{
	"auths" : {
		"fake.com" : {
			"auth" : "fakeToken987654321"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		},
		"fake.com" : {
			"auth" : "fakeToken987654321"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		},
		"fake.com" : {
			"auth" : "fakeToken987654321"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
### TestName: testExistingRegistryAuthMatched ###
initial: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789",
			"email" : null
		}
	}
}
expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789",
			"email" : null
		}
	}
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789",
			"email" : null
		}
	}
}
### TestName: testMalformedConfigIsFixed ###
initial: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	},},
}
expected: 
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	}
}
actual:   
{
	"auths" : {
		"example.com" : {
			"auth" : "token123456789"
		}
	}
}

Standard error

Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Generating a private registry config file at: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already exists at: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{ }
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already exists at: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already exists at: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already exists at: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"fake.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		},
		"fake.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already exists at: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"fake.com" : {
			"auth" : "****Token Redacted****"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		},
		"fake.com" : {
			"auth" : "****Token Redacted****"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already exists at: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already contains the correct auth token for registry: example.com
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
SEVERE: null
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('}' (code 125)): was expecting double-quote to start field name
 at [Source: (File); line: 6, column: 5]
	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2477)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:750)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:674)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleOddName(UTF8StreamJsonParser.java:2144)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._parseName(UTF8StreamJsonParser.java:1794)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextFieldName(UTF8StreamJsonParser.java:1081)
	at com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer._deserializeContainerNoRecursion(JsonNodeDeserializer.java:536)
	at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:100)
	at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:25)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at com.fasterxml.jackson.databind.ObjectMapper._readTreeAndClose(ObjectMapper.java:4867)
	at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3252)
	at componenttest.containers.registry.Registry.persistAuthToken(Registry.java:226)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:575)
	at componenttest.containers.registry.RegistryTest.testMalformedConfigIsFixed(RegistryTest.java:280)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:575)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:112)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:54)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:53)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:575)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
	at jdk.proxy1/jdk.proxy1.$Proxy4.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:183)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:122)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:72)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

Oct 17, 2025 8:23:01 PM com.ibm.websphere.simplicity.log.Log warning
WARNING: Could not read config file, or it was malformed, recreating from scrach
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	}
}
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry writeFile
INFO: Wrote property to: /home/libbld/Build/jbe/build/open-liberty/dev/fattest.simplicity/build/libs/tmp/.docker/config.json
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auth element under registry [ example.com ] element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auth element under registry [ example.com ] element
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config contains an auth element that is not textual
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry generateAuthToken
INFO: Generating registry auth token from system properties: [ test.registry.user, test.registry.password]
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry generateAuthToken
INFO: Generating registry auth token from system properties: [ test.registry.user, test.registry.password]
Oct 17, 2025 8:23:01 PM componenttest.containers.registry.Registry generateAuthToken
INFO: Generated registry auth token starting with: dGVz....