[ARVADOS] updated: a9e08c498ac8126026d1226f34913f87c8e590a0

git at public.curoverse.com git at public.curoverse.com
Fri Oct 16 10:25:53 EDT 2015


Summary of changes:
 sdk/go/arvadosclient/arvadosclient_test.go         |  2 +-
 sdk/go/arvadostest/run_servers.go                  | 22 +++++++---------------
 sdk/go/keepclient/keepclient_test.go               |  4 ++--
 services/datamanager/datamanager_test.go           |  4 ++--
 services/keepproxy/keepproxy_test.go               |  4 ++--
 services/keepstore/pull_worker_integration_test.go |  2 +-
 tools/keep-rsync/keep-rsync_test.go                |  7 ++++---
 7 files changed, 19 insertions(+), 26 deletions(-)

       via  a9e08c498ac8126026d1226f34913f87c8e590a0 (commit)
      from  c9018ad3b7f67f2f15a6a6671bf271858926586e (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 a9e08c498ac8126026d1226f34913f87c8e590a0
Author: radhika <radhika at curoverse.com>
Date:   Fri Oct 16 10:23:12 2015 -0400

    7167: Remove StartKeepWithParams and StopKeepWithParams and make StartKeep and StopKeep with parameters the only exposed funcs.
    The update was small enough, about 10 usages in the entire code, and hence did not make sense to postpone it for a "better" time.

diff --git a/sdk/go/arvadosclient/arvadosclient_test.go b/sdk/go/arvadosclient/arvadosclient_test.go
index d35f6da..2c508dc 100644
--- a/sdk/go/arvadosclient/arvadosclient_test.go
+++ b/sdk/go/arvadosclient/arvadosclient_test.go
@@ -21,7 +21,7 @@ type ServerRequiredSuite struct{}
 
 func (s *ServerRequiredSuite) SetUpSuite(c *C) {
 	arvadostest.StartAPI()
-	arvadostest.StartKeep()
+	arvadostest.StartKeep(2, false)
 }
 
 func (s *ServerRequiredSuite) SetUpTest(c *C) {
diff --git a/sdk/go/arvadostest/run_servers.go b/sdk/go/arvadostest/run_servers.go
index e922104..27c552a 100644
--- a/sdk/go/arvadostest/run_servers.go
+++ b/sdk/go/arvadostest/run_servers.go
@@ -99,14 +99,10 @@ func StopAPI() {
 	exec.Command("python", "run_test_server.py", "stop").Run()
 }
 
-// StartKeep starts 2 keep servers with enforcePermissions=false
-func StartKeep() {
-	StartKeepWithParams(2, false)
-}
-
-// StartKeepWithParams starts the given number of keep servers,
+// StartKeep starts the given number of keep servers,
 // optionally with -enforce-permissions enabled.
-func StartKeepWithParams(numKeepServers int, enforcePermissions bool) {
+// Use numKeepServers = 2 and enforcePermissions = false under all normal circumstances.
+func StartKeep(numKeepServers int, enforcePermissions bool) {
 	cwd, _ := os.Getwd()
 	defer os.Chdir(cwd)
 	chdirToPythonTests()
@@ -128,14 +124,10 @@ func StartKeepWithParams(numKeepServers int, enforcePermissions bool) {
 	}
 }
 
-func StopKeep() {
-	StopKeepWithParams(2)
-}
-
-// StopKeepServers stops keep servers that were started with
-// StartKeep. numkeepServers should be the same value that was passed
-// to StartKeep.
-func StopKeepWithParams(numKeepServers int) {
+// StopKeep stops keep servers that were started with StartKeep.
+// numkeepServers should be the same value that was passed to StartKeep,
+// which is 2 under all normal circumstances.
+func StopKeep(numKeepServers int) {
 	cwd, _ := os.Getwd()
 	defer os.Chdir(cwd)
 	chdirToPythonTests()
diff --git a/sdk/go/keepclient/keepclient_test.go b/sdk/go/keepclient/keepclient_test.go
index b5bc5ce..aaba069 100644
--- a/sdk/go/keepclient/keepclient_test.go
+++ b/sdk/go/keepclient/keepclient_test.go
@@ -45,14 +45,14 @@ func (s *ServerRequiredSuite) SetUpSuite(c *C) {
 		return
 	}
 	arvadostest.StartAPI()
-	arvadostest.StartKeep()
+	arvadostest.StartKeep(2, false)
 }
 
 func (s *ServerRequiredSuite) TearDownSuite(c *C) {
 	if *no_server {
 		return
 	}
-	arvadostest.StopKeep()
+	arvadostest.StopKeep(2)
 	arvadostest.StopAPI()
 }
 
diff --git a/services/datamanager/datamanager_test.go b/services/datamanager/datamanager_test.go
index 3d9bb3d..c2cb762 100644
--- a/services/datamanager/datamanager_test.go
+++ b/services/datamanager/datamanager_test.go
@@ -31,7 +31,7 @@ func SetupDataManagerTest(t *testing.T) {
 	// start api and keep servers
 	arvadostest.ResetEnv()
 	arvadostest.StartAPI()
-	arvadostest.StartKeep()
+	arvadostest.StartKeep(2, false)
 
 	arv = makeArvadosClient()
 
@@ -54,7 +54,7 @@ func SetupDataManagerTest(t *testing.T) {
 }
 
 func TearDownDataManagerTest(t *testing.T) {
-	arvadostest.StopKeep()
+	arvadostest.StopKeep(2)
 	arvadostest.StopAPI()
 }
 
diff --git a/services/keepproxy/keepproxy_test.go b/services/keepproxy/keepproxy_test.go
index 6fe8fe7..7643e4b 100644
--- a/services/keepproxy/keepproxy_test.go
+++ b/services/keepproxy/keepproxy_test.go
@@ -53,7 +53,7 @@ func closeListener() {
 
 func (s *ServerRequiredSuite) SetUpSuite(c *C) {
 	arvadostest.StartAPI()
-	arvadostest.StartKeep()
+	arvadostest.StartKeep(2, false)
 }
 
 func (s *ServerRequiredSuite) SetUpTest(c *C) {
@@ -61,7 +61,7 @@ func (s *ServerRequiredSuite) SetUpTest(c *C) {
 }
 
 func (s *ServerRequiredSuite) TearDownSuite(c *C) {
-	arvadostest.StopKeep()
+	arvadostest.StopKeep(2)
 	arvadostest.StopAPI()
 }
 
diff --git a/services/keepstore/pull_worker_integration_test.go b/services/keepstore/pull_worker_integration_test.go
index e0bad00..3a3069a 100644
--- a/services/keepstore/pull_worker_integration_test.go
+++ b/services/keepstore/pull_worker_integration_test.go
@@ -27,7 +27,7 @@ func SetupPullWorkerIntegrationTest(t *testing.T, testData PullWorkIntegrationTe
 
 	// start api and keep servers
 	arvadostest.StartAPI()
-	arvadostest.StartKeep()
+	arvadostest.StartKeep(2, false)
 
 	// make arvadosclient
 	arv, err := arvadosclient.MakeArvadosClient()
diff --git a/tools/keep-rsync/keep-rsync_test.go b/tools/keep-rsync/keep-rsync_test.go
index f109188..6fbb535 100644
--- a/tools/keep-rsync/keep-rsync_test.go
+++ b/tools/keep-rsync/keep-rsync_test.go
@@ -59,7 +59,7 @@ func (s *ServerRequiredSuite) SetUpTest(c *C) {
 }
 
 func (s *ServerRequiredSuite) TearDownTest(c *C) {
-	arvadostest.StopKeepWithParams(3)
+	arvadostest.StopKeep(3)
 }
 
 func (s *DoMainTestSuite) SetUpTest(c *C) {
@@ -94,7 +94,7 @@ func setupRsync(c *C, enforcePermissions bool, replications int) {
 	}
 
 	// Start Keep servers
-	arvadostest.StartKeepWithParams(3, enforcePermissions)
+	arvadostest.StartKeep(3, enforcePermissions)
 
 	// setup keepclients
 	var err error
@@ -421,6 +421,7 @@ func setupConfigFile(c *C, name string) *os.File {
 	fileContent := "ARVADOS_API_HOST=" + os.Getenv("ARVADOS_API_HOST") + "\n"
 	fileContent += "ARVADOS_API_TOKEN=" + os.Getenv("ARVADOS_API_TOKEN") + "\n"
 	fileContent += "ARVADOS_API_HOST_INSECURE=" + os.Getenv("ARVADOS_API_HOST_INSECURE") + "\n"
+	fileContent += "ARVADOS_EXTERNAL_CLIENT=false\n"
 	fileContent += "ARVADOS_BLOB_SIGNING_KEY=abcdefg"
 
 	_, err = file.Write([]byte(fileContent))
@@ -468,7 +469,7 @@ func (s *DoMainTestSuite) Test_doMainWithSrcAndDstConfig(c *C) {
 
 	// Start keepservers. Since we are not doing any tweaking as in setupRsync func,
 	// kcSrc and kcDst will be the same and no actual copying to dst will happen, but that's ok.
-	arvadostest.StartKeep()
+	arvadostest.StartKeep(2, false)
 
 	err := doMain()
 	c.Check(err, IsNil)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list