Comments (6)
@rohanKanojia, Kindly assign this issue to me.
from jkube.
@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.
Please create a specific test for windows annotated with @EnabledOn...
and disable the original test in windows with @DisabledOn...
from jkube.
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
.
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.
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:
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.
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.
@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)
- KubernetesResourceTaskTest.setUp The declared Exception exception is never thrown HOT 1
- KubernetesUndeployTaskTest.setUp The declared Exception exception is never thrown HOT 1
- KubernetesWatchTaskTest.setUp The declared Exception exception is never thrown HOT 4
- MavenIssueManagementEnricherTest.setUp The declared Exception exception is never thrown HOT 1
- Cannot make k8s:helm-lint work with either 1.16.0 or 1.17-SNAPSHOT HOT 8
- Fix unit tests failing for windows in `jkube-kit/config/service` module HOT 1
- Fix failing JibBuildServiceBuildIntegrationTest in `jkube-kit/config`
- NpipeConnectionSocketFactory.createSocket The declared Exception exception is never thrown
- OCIRegistryInterceptorTest The declared Exception exception is never thrown
- OpenShiftHelmLintTaskTest.setUp The declared Exception exception is never thrown
- PortForwardServiceTest.setUp The declared Exception exception is never thrown HOT 3
- SpringBootUtilTest The declared Exception exception is never thrown HOT 1
- SpringBootWatcher.watch The declared Exception exception is never thrown HOT 1
- PortForwardServiceTest : Remove use of `Thread.sleep` HOT 3
- Quickstarts : Update Micronaut version in `quickstarts/maven/micronaut` HOT 1
- Quickstarts : Add Quickstart for Micronaut 4 HOT 6
- ImageConfigurationTest : Remove usage of `org.mockito.Mockito.mock` with real objects using builders HOT 1
- BuildConfigurationTest : Remove usage of `org.mockito.Mockito.mock` with real objects using builders HOT 1
- SecretEnricher : Use primitive `int` instead of `Integer` in for loop HOT 6
- Inconsistency when merging a route.yml fragment with two different profiles (commons, demo) HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jkube.