aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mchucarr...@apache.org
Subject git commit: Improve coverage in the end-to-end test.
Date Thu, 14 Aug 2014 20:51:38 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 9bc993b84 -> ce808e309


Improve coverage in the end-to-end test.

Adds the following to the end-to-end:
- "config list"
- "job status"
- "job list" with partial key
- "job kill", both failing with no instance list, and killing a specific instance
- "job restart"

Bugs closed: aurora-646

Reviewed at https://reviews.apache.org/r/24712/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/ce808e30
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/ce808e30
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/ce808e30

Branch: refs/heads/master
Commit: ce808e309445b154610e659833f1aed040f2cf8c
Parents: 9bc993b
Author: Mark Chu-Carroll <mchucarroll@twopensource.com>
Authored: Thu Aug 14 16:43:56 2014 -0400
Committer: Mark Chu-Carroll <mchucarroll@twitter.com>
Committed: Thu Aug 14 16:43:56 2014 -0400

----------------------------------------------------------------------
 .../org/apache/aurora/e2e/test_end_to_end_v2.sh | 22 ++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ce808e30/src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh
----------------------------------------------------------------------
diff --git a/src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh b/src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh
index 8e18e52..14a0b62 100755
--- a/src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh
+++ b/src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh
@@ -34,17 +34,27 @@ test_http_example() {
   local _base_config=$6 _updated_config=$7
   jobkey="$_cluster/$_role/$_env/$_job"
 
-  vagrant ssh -c "aurora job inspect $jobkey $_base_config"
+  joblist=$(vagrant ssh -c "aurora2 config list $_base_config")
+  test "$joblist" = "jobs=[$jobkey]"
+
+  vagrant ssh -c "aurora2 job inspect $jobkey $_base_config"
 
   echo '== Creating job'
   vagrant ssh -c "aurora2 job create $jobkey $_base_config"
 
+  echo "== Checking job status"
+  vagrant ssh -c "aurora2 job list $_cluster/$_role/$_env" | grep "$jobkey"
+  vagrant ssh -c "aurora2 job status $jobkey"
   # Check that scheduler UI pages shown
   base_url="http://$_sched_ip:8081"
   check_url_live "$base_url/scheduler"
   check_url_live "$base_url/scheduler/$_role"
   check_url_live "$base_url/scheduler/$_role/$_env/$_job"
 
+  echo "== Restarting test job"
+
+  vagrant ssh -c "aurora2 job restart $jobkey $_updated_config"
+
   echo '== Updating test job'
   vagrant ssh -c "aurora2 job update $jobkey $_updated_config"
 
@@ -57,8 +67,16 @@ test_http_example() {
   runlen=$(vagrant ssh -c "aurora2 task run $jobkey 'pwd'" | wc -l)
   test $runlen -eq 4
 
-  vagrant ssh -c "aurora2 quota get $_cluster/$_role"
+  # Run a kill without specifying instances, and verify that it gets an error, and the job
+  # isn't affected. (TODO(mchucarroll): the failed kill should return non-zero!)
+  vagrant ssh -c "aurora2 job kill $jobkey" 2>&1 | grep -q "The instances list cannot
be omitted in a kill command"
+  check_url_live "$base_url/scheduler/$_role/$_env/$_job"
+
+  vagrant ssh -c "aurora2 job kill $jobkey/1"
+
   vagrant ssh -c "aurora2 job killall  $jobkey"
+
+  vagrant ssh -c "aurora2 quota get $_cluster/$_role"
 }
 
 RETCODE=1


Mime
View raw message