You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by GitBox <gi...@apache.org> on 2022/09/17 19:37:05 UTC

[GitHub] [karaf] awrb opened a new pull request, #1621: KARAF-7552: add tests for feature:repo commands

awrb opened a new pull request, #1621:
URL: https://github.com/apache/karaf/pull/1621

   Hi, it's my first contribution so for starters I added some tests to feature repo commands.
   If the PR is fine then I'll gladly submit more later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [karaf] awrb commented on pull request #1621: KARAF-7552: add tests for feature:repo commands

Posted by GitBox <gi...@apache.org>.
awrb commented on PR #1621:
URL: https://github.com/apache/karaf/pull/1621#issuecomment-1250715906

   @jbonofre  Ah I missed the itests somehow. They're certainly more useful than the tests with mocked FeaturesService. There are a few similar tests that I looked at before adding the ones in the PR (testing the command with mocks rather than pax-exam), e.g.
   `org.apache.karaf.bundle.command.ListServicesTest`
   `org.apache.karaf.features.command.ListFeaturesCommandTest`
   `org.apache.karaf.config.command.EditCommandTest`
   so based on these I thought this approach for testing commands is OK.
   
   It seems to me that it's still useful to have tests like that, to check if the command is calling the proper service methods, passing the correct arguments etc. If you are working on the commands, they're also easier to run than pax-exam and can act as a preliminary test. But it's best for the maintainers to decide. 
   
   Another question: is some code coverage tool used in the project? I only found jacoco in tooling/karaf-maven-plugin. Maybe there is sonarqube on jenkins or something? I'd like to use something to check where more test cases can be supplied.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [karaf] jbonofre commented on pull request #1621: KARAF-7552: add tests for feature:repo commands

Posted by GitBox <gi...@apache.org>.
jbonofre commented on PR #1621:
URL: https://github.com/apache/karaf/pull/1621#issuecomment-1250719322

   @awrb yes, I think the tests are interesting, just wanted to spot on the itests ;)
   
   Yes, we are using jacoco for test coverage + sonar. You can see the sonar configuration in the Jenkinsfile: https://github.com/apache/karaf/blob/main/Jenkinsfile#L96
   
   However, it's commented right now as almost all PR builds are failing due to that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [karaf] jbonofre merged pull request #1621: KARAF-7552: add tests for feature:repo commands

Posted by GitBox <gi...@apache.org>.
jbonofre merged PR #1621:
URL: https://github.com/apache/karaf/pull/1621


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org