New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bound {job} to JobName #385
Conversation
Hi @wslulciuc, I am new to the pull request process. Can you please guide me through the process? |
Sure thing. Have you looked over our contributing guide? CONTRIBUTING.md |
For some reason I cannot run ./gradlew test. Also, once I have made the changes according to the document I have to write a test. Can you please give me an idea about what kind of test? If you can give a for instance it would be great. |
I'd make sure you're running
Writing a test depends on the change. For a new feature, or in the case of simply adding logic to existing code, there may not be proper code overage. So, it's important tests are included along with the PR. In the case of your changes, we have existing tests. Meaning, once you update how we bind |
Codecov Report
@@ Coverage Diff @@
## master #385 +/- ##
===========================================
+ Coverage 77.15% 77.2% +0.04%
Complexity 396 396
===========================================
Files 91 91
Lines 1042 1044 +2
Branches 48 48
===========================================
+ Hits 804 806 +2
Misses 173 173
Partials 65 65
Continue to review full report at Codecov.
|
@wslulciuc Thanks for the help. I have solved the errors. Can you please review the code? |
@@ -69,7 +70,7 @@ public JobResource(final NamespaceService namespaceService, final JobService job | |||
@Timed | |||
public Response create( | |||
@PathParam("namespace") final String namespace, | |||
@PathParam("job") final String job, | |||
@PathParam("job") JobName job, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Let's also update the method param name: JobName job
=> JobName jobName
@@ -25,4 +25,8 @@ | |||
@ToString | |||
public final class JobName { | |||
@Getter @NonNull private final String value; | |||
|
|||
public String getVal() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A getter method will be generated by lombok with @Getter
. So, we can remove getVal()
. Please see JobNameTest
for example usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, @pbrahmbhatt3! I left some minor comments. We can merge in your changes once they are addressed.
@wslulciuc I have updated my code according to your comments. Please let me know if its good to go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, @pbrahmbhatt3!
Fix375
Bound {job} in the path variable to JobName in JobResource.java file.