GitHub user pedro-martins opened a pull request:
https://github.com/apache/cloudstack/pull/944
Create test cases to getPatchFilePath method and class names changed
In this commit we created tests cases for the respective classes in package
âcom.cloud.hypervisor.xenserver.resourceâ.
We added test cases to check the implementation of
âcom.cloud.hypervisor.xenserver.resource.CitrixResourceBase.getPatchFilesâ.
Therefore, we test in a more comprehensive way the tests that already exist to
check the code of
âcom.cloud.hypervisor.xenserver.resource.CitrixResourceBase.getPatchFilePathâ.
We added a new abstract class, called
com.cloud.hypervisor.xenserver.resource.CitrixResourceBaseTest.java
This class has two tests methods:
*
com.cloud.hypervisor.xenserver.resource.CitrixResourceBaseTest.testGetPathFilesExeption(CitrixResourceBase),
this method tests if the getPatchFilePath() method throws the
com.cloud.utils.exception.CloudRuntimeException.CloudRuntimeException when the
com.cloud.utils.script.Script.findScript(String, String) return a null value;
*
com.cloud.hypervisor.xenserver.resource.CitrixResourceBaseTest.testGetPathFilesListReturned(CitrixResourceBase),
this method tests the correct return value from getPatchFilePath() method,
basically, verify if the returned list contain the file with the same absolute
path that was retrieved from the findScript method.
We also changed the name of those test classes, the change was basically
remove the âPathâ word from the name of classes.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rafaelweingartner/cloudstack
lrg-cs-hackday-012
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/944.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #944
----
commit b9e508c612dc361a21ccde85e31b251b16fcdff4
Author: pedro-martins <[email protected]>
Date: 2015-10-17T20:33:41Z
created tests cases for the respective classes in package
âcom.cloud.hypervisor.xenserver.resourceâ.
also changed the name of those test classes, the change was basically
remove the âPathâ word from the name of classes.
commit 8ba4c672b564ee16d1c1cbb42979a0c456c6bbc8
Author: pedro-martins <[email protected]>
Date: 2015-10-17T20:36:40Z
change the private method
com.cloud.hypervisor.xenserver.resource.CitrixResourceBase.getPatchFiles
to protected
added new class in test cases
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---