jkube
jkube copied to clipboard
JUnit Testcases failing while building the project in windows
Description
While building the project some of the Junit test cases are failing in couple of classes.
Hello @baruKreddy Thanks for reporting this issue.
- Could you provide more details to this?: how to reproduce and logs
- Would you like to work on this?
Hi @sunix
- In windows if we try doing mvn clean install in command prompt, we will be able to see test cases failing
- I will definitely give a try by changing a method appropriately which is failing for windows.
Regards Bhargavi Reddy
@rohanKanojia @sunix can you help me with building the project. I see that testcases are failing wherever the docker image is involved(needed) , did debugging. whenever I try mvn clean install, I see some auth problem with docker registry. Apart from doing mvn clean install, should we do anything so that I get required docker image. Let me know which step I'm missing. Adding stack trace for reference
[INFO] JIB> The base image requires auth. Trying again for alpine... [INFO] [INFO] JIB> [============ ] 40.0% complete > building image to tar file [INFO] [ERROR] k8s: Unable to build the image tarball: : com.google.cloud.tools.jib.api.RegistryAuthenticationFailedException: Failed to authenticate wi th registry registry-1.docker.io/library/alpine because: 401 Unauthorized [INFO] {"details":"incorrect username or password"} [INFO] [INFO] [ERROR] k8s: Failed to execute the build [Error when building JIB image] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] BUILD FAILURE [INFO] [INFO] ----------------------------
I've experienced failing tests as well while testing the branch for https://github.com/eclipse/jkube/issues/1382
If needed, it's possible to skip them with -DskipTests (-Dmaven.test.skip=true is not honored).
In my case, the tests were verifying that the generated Dockerfile has the same content as the one used as reference and this is failing on Windows, probably due to different line breaks (CRLF vs LF) since the readable (aka all the printable chars) contents are the same.
This is a known issue. Many of the tests were implemented having *nix FS in mind.
This is a known issue. Many of the tests were implemented having *nix FS in mind.
It's clearly visible :D