1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-04 17:47:00 +03:00

Small fix in Java OCA tests

This commit is contained in:
Carlos Martín 2012-10-15 12:25:34 +02:00
parent f4bed4b426
commit 29077a8066
2 changed files with 22 additions and 5 deletions

View File

@ -223,13 +223,13 @@ public class AclTest
assertTrue( res.getErrorMessage(), !res.isError() );
aclPool.info();
assertTrue( aclPool.getLength() == 3 );
assertTrue( aclPool.getLength() == 4 );
res = Acl.delete(client, res.getIntMessage());
assertTrue( res.getErrorMessage(), !res.isError() );
aclPool.info();
assertTrue( aclPool.getLength() == 2 );
assertTrue( aclPool.getLength() == 3 );
}
catch (RuleParseException e)
{

View File

@ -13,11 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.*;
import org.junit.Test;
import org.opennebula.client.Client;
import org.opennebula.client.*;
public class SessionTest {
@ -53,4 +52,22 @@ public class SessionTest {
assertNull("Client should complain about misspelled url", oneClient);
}
@Test
public void version()
{
Client oneClient = null;
try
{
oneClient = new Client();
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
OneResponse res = oneClient.get_version();
assertTrue( res.getErrorMessage(), !res.isError() );
}
}