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)
- MojoExecutionService 'goal.length() > 0' can be replaced with '!goal.isEmpty()' HOT 3
- OpenShiftBuildServiceUtils 'nocache.length() == 0' can be replaced with 'nocache.isEmpty()' HOT 3
- RegistryConfigTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 3
- JKubeConfigurationTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 3
- ControllerResourceConfigTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 4
- KubernetesSshServiceForwarderTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 1
- JibServiceUtilTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 2
- Replace `maven-failsafe-plugin`'s deprecated `systemProperties` configuration field with `systemPropertyVariables` HOT 1
- PluginServiceFactory 'line.length() > 0' can be replaced with '!line.isEmpty()'
- RegistryAuthConfiguration 'content[i + 1].length() > 0' can be replaced with '!content[i + 1].isEmpty()' HOT 1
- UrlBuilder 'queryParams.size() > 0' can be replaced with '!queryParams.isEmpty()' HOT 1
- WebServerEventCollector 'evts.size() > 0' can be replaced with '!evts.isEmpty()' HOT 1
- ImageNameTest: Unnecessary 'toString()' call HOT 2
- KarafHealthCheckEnricher: Unnecessary 'toString()' call
- HelmServiceInstallIT is failing on Windows HOT 1
- DeploymentConfigHandlerTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 1
- KubernetesResourceUtilTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 2
- ProbeHandlerTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 1
- ServiceHandlerTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))` HOT 1
- CronJobHandlerTest : Replace AssertJ's deprecated `asList()` DSL method with `asInstanceOf(InstanceOfAssertFactories.list(type.class))`
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.