Giter VIP home page Giter VIP logo

Comments (6)

l3002 avatar l3002 commented on July 3, 2024 2

@rohanKanojia, Kindly assign this issue to me.

from jkube.

rohanKanojia avatar rohanKanojia commented on July 3, 2024 1

@l3002 : Although I think Marc's opinion would also be same as yours. But it's okay to wait for a few hours till he comes back.

from jkube.

manusa avatar manusa commented on July 3, 2024 1

Please create a specific test for windows annotated with @EnabledOn... and disable the original test in windows with @DisabledOn...

from jkube.

l3002 avatar l3002 commented on July 3, 2024

Hi @rohanKanojia / @manusa : While working on this issue, I realized that in addition to the above mentioned problem with file separator, one more test was failing in HelmServiceUploadIT.

Test Failure at : HelmServiceUploadIT$OCI.withSuccessfulUpload_shouldUploadBlobsAndUpdateManifest()

The test was returning a BadUploadException : 404 while uploading the chart to the mock server. Upon investigation I found that it was occurring due to the change in message digest for Chart.yaml.

image

image

I suspect when we invoke Serialization.asJson(chart) after creating the Chart Object, it actually uses the platform dependent line separator (CRLF) for creating json with the data in Chart.yaml due to which when we create the byteArray it actually encodes the data accordingly and therefore the change in digest.

image

There can be two fixes to this issue. Either we can configure this test HelmServiceUploadIT$OCI.withSuccessfulUpload_shouldUploadBlobsAndUpdateManifest() by adding new mockServer.expect() statement and adding a new if statement before assertThat() statement to check if the OS is windows or Linux/Mac as due to the change in content of chart (LF -> CRLF) the digest and the size is altered. See below:

image
image

Or We can write a separate test for windows, where we will first configure mock server to expect the request with the message digest created for the windows chart and then add the assertThat() statement to test it. In this case, we will have to add @DisabledOnOs(OS.WINDOWS) and @DisabledOnOs(OS.LINUX)

I believe that the latter would be the best approach as when I tried to configure the test HelmServiceUploadIT$OCI.withSuccessfulUpload_shouldUploadBlobsAndUpdateManifest() to covering windows test, it seems messy and unreadable. Also, I'm not sure how to write a assertThat() statement for a specific platform. Just wanted to know what your thoughts are on the same.

from jkube.

rohanKanojia avatar rohanKanojia commented on July 3, 2024

In this case, we will have to add @DisabledOnOs(OS.WINDOWS) and @DisabledOnOs(OS.LINUX)

@l3002 : I agree with you. Adding conditionals for platform specific checks might make test less readble. It's better to write it as a separate test.

from jkube.

l3002 avatar l3002 commented on July 3, 2024

@rohanKanojia : Got it. So, Shall I start working on the PR or wait for @manusa's thought on this matter?

from jkube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.