Comments (12)
Looks okay to me. Could you also list the test classes that would require changes in order to fix this issue?
I'll create a PR for this one after GSoC.
I think someone else can also pick it up if we explain the issue clearly.
from jkube.
@ShivangMishra : Yeah, sounds good. Just make sure permissions are open for anyone.
from jkube.
I am not sure to understand the value, it makes the test "bigger" from what I see
Instead of using mocks, we should test on real objects. As far as I understand, we should use mocks only when we cannot directly test on real objects(maybe because the implementation is not complete).
This will prevent complications like we got that Null Pointer Exception earlier.
Also, it won't make the tests bigger. In this example, setup() in the screenshot at the bottom is bigger because I have used some extra properties. I'll update it with a better example.
from jkube.
I'd start just with one of the files so that you get feedback on your approach.
from jkube.
@rohanKanojia does this issue look okay?
I'll create a PR for this one after GSoC.
from jkube.
@rohanKanojia lots of test classes use mock. I'll make a google sheet and will add it in the description. Would that be okay?
@ShantKhatri if you're interested, please go through this issue and make a list... You can start by making similar changes in the generators. Make a draft PR once this much is done.
from jkube.
I am not sure to understand the value, it makes the test "bigger" from what I see
from jkube.
@rohanKanojia @ShivangMishra I have created list of files which includes mock testing. Here is the google sheet: https://docs.google.com/spreadsheets/d/14bcELvvAVEx5bI30GNgktjqVe6zrx562pRNjjVeI7aA/edit?usp=sharing
Could you please guide me more on this? so I can start work on it.
from jkube.
Hi @ShantKhatri,
Are you working on this?
from jkube.
Hi @ShantKhatri, Are you working on this?
I was waiting for reply from @rohanKanojia and @ShivangMishra that from above sheet in which files mocking should we have to replace with generator tests?
from jkube.
@rohanKanojia @manusa Do I need to create a separate issue for each file on which I'm working, or can I create a PR for this (#2316) issue only? In that case, there would be multiple PRs linked with a single issue.
from jkube.
I'd start just with one of the files so that you get feedback on your approach.
@manusa Could you please guide me with approach?
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)
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.