INFO: nodeIdFile :/tmp/junit9580931651746848476/not-readable/node-id–rw-------
[ERROR] Tests run: 22, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.294 s <<< FAILURE! – in org.graylog2.ConfigurationTest
[ERROR] org.graylog2.ConfigurationTest.testNodeIdFilePermissions – Time elapsed: 0.069 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
Expecting value to be false but was true
at org.graylog2.ConfigurationTest.testNodeIdFilePermissions(ConfigurationTest.java:150)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
In the above errors : The test case validating the below folder contains read write permission —> /tmp/junit9580931651746848476/not-readable/node-id. but the folder does not exist. while i try to create the folder manually its difficult to predict the value of “junit9580931651746848476”, the value changes dynamically for every build.
Then finally the failures are :
[ERROR] ConfigurationTest.testNodeIdFilePermissions:150
Expecting value to be false but was true
[ERROR] HttpConfigurationTest.tlsValidationFailsIfCertificateIsUnreadable Expected test to throw (an instance of com.github.joschi.jadconfig.ValidationException and exception with message a string containing "Unreadable or missing HTTP X.509 certificate: ")
[ERROR] HttpConfigurationTest.tlsValidationFailsIfPrivateKeyIsUnreadable Expected test to throw (an instance of com.github.joschi.jadconfig.ValidationException and exception with message a string containing "Unreadable or missing HTTP private key: ").
Can you elaborate on what you are trying to do here? Since you are running the unit tests, I assume you can also step through in a debugger to pinpoint your problem.
The test uses TemporaryFolder.class to generate the folder and files. You do not need to create anything manually.
the parentNotReadable file not created on run time. so while the execution of validateWithPermissions function ,it verify the file exist or not. In our case the parentNotReadable not exists. So it return true but expected value is false.
And then another error is HttpConfigurationTest.tlsValidationFailsIfCertificateIsUnreadable Expected test to throw (an instance of com.github.joschi.jadconfig.ValidationException and exception with message a string containing "Unreadable or missing HTTP X.509 certificate: ").