예제 #1
0
 // TODO: search, page, order
 @Test(
     description = "List environments. Check if updated name is present",
     dependsOnMethods = {"test_environmentUpdate"})
 public void test_environmentList() {
   HammerEnvironment env = new HammerEnvironment(cli_worker, newName);
   exec_result = env.cli_list(null, null, null);
   Assert.assertTrue(exec_result.getExitCode() == 0, "Check - return code");
   Assert.assertTrue(
       getOutput(exec_result).contains(newName), "Check - updated domain name is listed");
   Assert.assertFalse(getOutput(exec_result).contains(name), "Check - previous namenot present");
 }
예제 #2
0
 // TODO: delete environment by ID
 @Test(
     description = "delete environment",
     dependsOnMethods = {"test_environmentList"})
 public void test_environmentDelete() {
   HammerEnvironment env = new HammerEnvironment(cli_worker, newName);
   exec_result = env.delete();
   Assert.assertTrue(exec_result.getExitCode() == 0, "Check - return code");
   Assert.assertTrue(
       getOutput(exec_result).contains(HammerEnvironment.OUT_DELETE),
       "Check - returned output string");
   // should not be listed
   exec_result = env.cli_list(null, null, null);
   Assert.assertTrue(exec_result.getExitCode() == 0, "Check - return code");
   Assert.assertFalse(
       getOutput(exec_result).contains(newName), "Check - deleted domain is not listed");
 }