-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Added test from CLIAction #9992
base: master
Are you sure you want to change the base?
Conversation
I might have misunderstood the task or made some mistakes, so I am always open to comments. I want to learn this project, so I decided to try it with tests. |
<dependency> | ||
<groupId>org.jenkins-ci.main</groupId> | ||
<artifactId>jenkins-test-harness</artifactId> | ||
<version>2353.ve3f890c6eea_f</version> | ||
<scope>test</scope> | ||
</dependency> |
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.
Remove and move the test to test/src/test/
The ticket seems unrelated to this PR, could you explain how they relate? |
Perhaps you are right and I really indicated the wrong ticket. I wanted to improve test coverage as a first step |
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.
@lifefire1 code in this PR LGTM.
Please update description of this PR, because it doesn't match with code now.
See JENKINS-70464
Testing done
I added a comprehensive set of unit tests for the
CLIAction
class, which include the following scenarios:doCommand()
method: Verifies that a 404 error is returned when an invalid command is requested.doCommand()
method with a valid parameter: Checks that the correct view dispatcher is called and forwarded when a valid command is provided.Forbidden
response is returned when WebSocket connections are not allowed.All tests were executed successfully on a local Jenkins instance.
Proposed changelog entries
CLIAction
class methods and WebSocket handling.Proposed upgrade guidelines
N/A
Pull Request Template