[ARVADOS] updated: 0fa9a01d6fb567fa6e2f72cae3596da2c12c35fd

git at public.curoverse.com git at public.curoverse.com
Wed Oct 7 18:25:25 EDT 2015


Summary of changes:
 sdk/go/arvadostest/run_servers.go                      | 18 ++++++++++++++----
 sdk/python/tests/run_test_server.py                    | 18 ++++++++++++------
 .../arvnodeman/computenode/dispatch/slurm.py           | 15 ++++++++++++---
 .../tests/test_computenode_dispatch_slurm.py           | 13 ++++++++++---
 tools/keep-rsync/keep-rsync_test.go                    |  2 +-
 5 files changed, 49 insertions(+), 17 deletions(-)

       via  0fa9a01d6fb567fa6e2f72cae3596da2c12c35fd (commit)
       via  0bae20041e6dd78b086ba1354b8de9aee4e6baed (commit)
       via  7c97dd88e541a0245272b8e93a33e4d2fe4e32cd (commit)
       via  2a94b125b93a3aba204f55c37ecdc2876d81d642 (commit)
       via  9c95a4c2dcd650627d524513e1e18596c8533ac0 (commit)
      from  96dab84d9f1cd7d590f2c119ed6e484c8ed4888c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0fa9a01d6fb567fa6e2f72cae3596da2c12c35fd
Author: radhika <radhika at curoverse.com>
Date:   Wed Oct 7 18:24:51 2015 -0400

    7167: add --keep-enforce-permissions to run_test_servers.py

diff --git a/sdk/go/arvadostest/run_servers.go b/sdk/go/arvadostest/run_servers.go
index a175136..ed75b4b 100644
--- a/sdk/go/arvadostest/run_servers.go
+++ b/sdk/go/arvadostest/run_servers.go
@@ -98,19 +98,29 @@ func StopAPI() {
 	exec.Command("python", "run_test_server.py", "stop").Run()
 }
 
+// StartKeep is used to start keep servers
+// with keepExisting = false and enforcePermissions = false
 func StartKeep() {
-	StartKeepAdditional(false)
+	StartKeepWithParams(false, false)
 }
 
-func StartKeepAdditional(keepExisting bool) {
+// StartKeepWithParams is used to start keep servers while specifying
+// keepExisting and enforcePermissions parameters.
+func StartKeepWithParams(keepExisting bool, enforcePermissions bool) {
 	cwd, _ := os.Getwd()
 	defer os.Chdir(cwd)
 	chdirToPythonTests()
 
-	cmd := exec.Command("python", "run_test_server.py", "start_keep")
+	keepExistingStr := ""
 	if keepExisting {
-		cmd = exec.Command("python", "run_test_server.py", "start_keep", "--keep_existing", "true")
+		keepExistingStr = "true"
 	}
+	enforcePermissionsStr := ""
+	if enforcePermissions {
+		enforcePermissionsStr = "true"
+	}
+	cmd := exec.Command("python", "run_test_server.py", "start_keep", "--keep-existing", keepExistingStr, "--keep-enforce-permissions", enforcePermissionsStr)
+
 	stderr, err := cmd.StderrPipe()
 	if err != nil {
 		log.Fatalf("Setting up stderr pipe: %s", err)
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index fba9bb6..a7b60e7 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -43,7 +43,8 @@ if not os.path.exists(TEST_TMPDIR):
 
 my_api_host = None
 _cached_config = {}
-keep_existing = None
+keep_existing = False
+enforce_permissions = False
 
 def find_server_pid(PID_PATH, wait=10):
     now = time.time()
@@ -324,8 +325,8 @@ def _start_keep(n, keep_args):
 
     return port
 
-def run_keep(blob_signing_key=None, enforce_permissions=False):
-    if keep_existing is None:
+def run_keep(blob_signing_key=None):
+    if not keep_existing:
       stop_keep()
 
     keep_args = {}
@@ -354,7 +355,7 @@ def run_keep(blob_signing_key=None, enforce_permissions=False):
 
     start_index = 0
     end_index = 2
-    if keep_existing is not None:
+    if keep_existing:
         start_index = 2
         end_index = 3
     for d in range(start_index, end_index):
@@ -605,10 +606,15 @@ if __name__ == "__main__":
     parser = argparse.ArgumentParser()
     parser.add_argument('action', type=str, help="one of {}".format(actions))
     parser.add_argument('--auth', type=str, metavar='FIXTURE_NAME', help='Print authorization info for given api_client_authorizations fixture')
-    parser.add_argument('--keep_existing', type=str, help="Used to add additional keep servers, without terminating existing servers")
+    parser.add_argument('--keep-existing', type=str, help="Used to add additional keep servers, without terminating existing servers")
+    parser.add_argument('--keep-enforce-permissions', type=str, help="Enforce keep permissions")
+
     args = parser.parse_args()
 
-    keep_existing = args.keep_existing
+    if args.keep_existing == 'true':
+        keep_existing = True
+    if args.keep_enforce_permissions == 'true':
+        enforce_permissions = True
 
     if args.action not in actions:
         print("Unrecognized action '{}'. Actions are: {}.".format(args.action, actions), file=sys.stderr)
diff --git a/tools/keep-rsync/keep-rsync_test.go b/tools/keep-rsync/keep-rsync_test.go
index 4fdc6a8..a4d26fd 100644
--- a/tools/keep-rsync/keep-rsync_test.go
+++ b/tools/keep-rsync/keep-rsync_test.go
@@ -64,7 +64,7 @@ func setupRsync(c *C) {
 	c.Assert(err, Equals, nil)
 
 	// Create two more keep servers to be used as destination
-	arvadostest.StartKeepAdditional(true)
+	arvadostest.StartKeepWithParams(true, false)
 
 	// load kcDst
 	kcDst, err = keepclient.MakeKeepClient(&arvDst)

commit 0bae20041e6dd78b086ba1354b8de9aee4e6baed
Merge: 96dab84 7c97dd8
Author: radhika <radhika at curoverse.com>
Date:   Wed Oct 7 16:50:04 2015 -0400

    Merge branch 'master' into 7167-keep-rsync-test-setup


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list