[ARVADOS] updated: e02d4d685419b759d904bb265b3f24e2061012b2
git at public.curoverse.com
git at public.curoverse.com
Thu Oct 15 11:04:21 EDT 2015
Summary of changes:
sdk/go/arvadostest/run_servers.go | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
via e02d4d685419b759d904bb265b3f24e2061012b2 (commit)
from 3bb46b45d572286721530aea8dc1ec068cf8ffea (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 e02d4d685419b759d904bb265b3f24e2061012b2
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Oct 15 11:02:30 2015 -0400
7167: Always pass --num-keep-servers to python wrapper. Update comments.
diff --git a/sdk/go/arvadostest/run_servers.go b/sdk/go/arvadostest/run_servers.go
index 68153b8..d20a095 100644
--- a/sdk/go/arvadostest/run_servers.go
+++ b/sdk/go/arvadostest/run_servers.go
@@ -99,23 +99,19 @@ func StopAPI() {
exec.Command("python", "run_test_server.py", "stop").Run()
}
-// StartKeep is used to start keep servers
-// with needMore = false and enforcePermissions = false
+// StartKeep starts 2 keep servers with enforcePermissions=false
func StartKeep() {
StartKeepWithParams(2, false)
}
-// StartKeepWithParams is used to start keep servers while specifying
-// numKeepServers and enforcePermissions parameters.
+// StartKeepWithParams starts the given number of keep servers,
+// optionally with -enforce-permissions enabled.
func StartKeepWithParams(numKeepServers int, enforcePermissions bool) {
cwd, _ := os.Getwd()
defer os.Chdir(cwd)
chdirToPythonTests()
- cmdArgs := []string{"run_test_server.py", "start_keep"}
- if numKeepServers != 2 {
- cmdArgs = append(cmdArgs, "--num-keep-servers", strconv.Itoa(numKeepServers))
- }
+ cmdArgs := []string{"run_test_server.py", "start_keep", "--num-keep-servers", strconv.Itoa(numKeepServers)}
if enforcePermissions {
cmdArgs = append(cmdArgs, "--keep-enforce-permissions")
}
@@ -136,17 +132,13 @@ func StopKeep() {
StopKeepServers(2)
}
-// StopKeepServers is used to stop keep servers while specifying numKeepServers
+// StopKeepServers stops keep servers that were started with
+// StartKeep. numkeepServers should be the same value that was passed
+// to StartKeep.
func StopKeepServers(numKeepServers int) {
cwd, _ := os.Getwd()
defer os.Chdir(cwd)
chdirToPythonTests()
- cmdArgs := []string{"run_test_server.py", "stop_keep"}
-
- if numKeepServers != 2 {
- cmdArgs = append(cmdArgs, "--num-keep-servers", strconv.Itoa(numKeepServers))
- }
-
- exec.Command("python", cmdArgs...)
+ exec.Command("python", "run_test_server.py", "stop_keep", "--num-keep-servers", strconv.Itoa(numKeepServers))
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list