Class componenttest.containers.registry.RegistryTest

11

tests

0

failures

0

ignored

0.046s

duration

100%

successful

Tests

Test Duration Result
testExistingDefaultConfig 0.006s passed
testExistingEmptyConfig 0.006s passed
testExistingIncorrectConfig 0.004s passed
testExistingRegistryAuth 0.004s passed
testExistingRegistryAuthAndDefaultConfig 0.009s passed
testExistingRegistryAuthMatched 0.003s passed
testFindExistingConfigResults 0.002s passed
testFindRegistry 0.001s 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

Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	}
}
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{ }
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	}
}
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"fake.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Mar 06, 2025 8:27:38 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
		}
	}
}
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"fake.com" : {
			"auth" : "****Token Redacted****"
		}
	},
	"credsStore" : "desktop",
	"currentContext" : "desktop-linux"
}
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Mar 06, 2025 8:27:38 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"
}
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Original contents:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****",
			"email" : null
		}
	}
}
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: Config already contains the correct auth token for registry: example.com
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 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:193)
	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:60)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
	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:94)
	at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

Mar 06, 2025 8:27:38 PM com.ibm.websphere.simplicity.log.Log warning
WARNING: Could not read config file, or it was malformed, recreating from scrach
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry persistAuthToken
INFO: New config.json contents are:
{
	"auths" : {
		"example.com" : {
			"auth" : "****Token Redacted****"
		}
	}
}
Mar 06, 2025 8:27:38 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
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auths element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the registry [ example.com ] element under the auths element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auth element under registry [ example.com ] element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config does not contain the auth element under registry [ example.com ] element
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findExistingConfig
INFO: Config contains an auth element that is not textual
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry findRegistry
INFO: Searching system property test.registry.prop for a registry.
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry generateAuthToken
INFO: Generating registry auth token from system properties: [ test.registry.user, test.registry.password]
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry generateAuthToken
INFO: Generating registry auth token from system properties: [ test.registry.user, test.registry.password]
Mar 06, 2025 8:27:38 PM componenttest.containers.registry.Registry generateAuthToken
INFO: Generated registry auth token starting with: dGVz....