コード例 #1
0
ファイル: keepproxy_test.go プロジェクト: Kunde21/arvados
func (s *NoKeepServerSuite) SetUpSuite(c *C) {
	arvadostest.StartAPI()
	// We need API to have some keep services listed, but the
	// services themselves should be unresponsive.
	arvadostest.StartKeep(2, false)
	arvadostest.StopKeep(2)
}
コード例 #2
0
func (s *ServerRequiredSuite) TearDownSuite(c *C) {
	if *no_server {
		return
	}
	arvadostest.StopKeep()
	arvadostest.StopAPI()
}
コード例 #3
0
func (s *integrationSuite) TearDownSuite(c *check.C) {
	if testing.Short() {
		c.Skip("-short")
	}
	arvadostest.StopKeep(4)
	arvadostest.StopAPI()
}
コード例 #4
0
func (s *DoMainTestSuite) Test_doMain_WithNoSuchBlockHashFile(c *C) {
	config := setupConfigFile(c, "config")
	defer os.Remove(config)

	arvadostest.StartKeep(2, false)
	defer arvadostest.StopKeep(2)

	args := []string{"-config", config, "-block-hash-file", "no-such-file"}
	err := doMain(args)
	c.Assert(strings.Contains(err.Error(), "no such file or directory"), Equals, true)
}
コード例 #5
0
func (s *DoMainTestSuite) Test_doMain_WithNoBlockHashFile(c *C) {
	config := setupConfigFile(c, "config")
	defer os.Remove(config)

	// Start keepservers.
	arvadostest.StartKeep(2, false)
	defer arvadostest.StopKeep(2)

	args := []string{"-config", config}
	err := doMain(args)
	c.Assert(strings.Contains(err.Error(), "block-hash-file not specified"), Equals, true)
}
コード例 #6
0
// Do a get on a block that exists on one of the keep servers.
// The setup method will create this block before doing the get.
func TestPullWorkerIntegration_GetExistingLocator(t *testing.T) {
	testData := PullWorkIntegrationTestData{
		Name:     "TestPullWorkerIntegration_GetLocator",
		Locator:  "5d41402abc4b2a76b9719d911017c592",
		Content:  "hello",
		GetError: "",
	}

	pullRequest := SetupPullWorkerIntegrationTest(t, testData, true)
	defer arvadostest.StopAPI()
	defer arvadostest.StopKeep(2)

	performPullWorkerIntegrationTest(testData, pullRequest, t)
}
コード例 #7
0
func (s *DoMainTestSuite) Test_doMainWithSrcAndDstConfig(c *C) {
	srcConfig := setupConfigFile(c, "src")
	dstConfig := setupConfigFile(c, "dst")
	args := []string{"-src", srcConfig.Name(), "-dst", dstConfig.Name()}
	os.Args = append(os.Args, args...)

	// 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(2, false)
	defer arvadostest.StopKeep(2)

	err := doMain()
	c.Check(err, IsNil)
}
コード例 #8
0
func (s *DoMainTestSuite) Test_doMain(c *C) {
	// Start keepservers.
	arvadostest.StartKeep(2, false)
	defer arvadostest.StopKeep(2)

	config := setupConfigFile(c, "config")
	defer os.Remove(config)

	locatorFile := setupBlockHashFile(c, "block-hash", []string{TestHash, TestHash2})
	defer os.Remove(locatorFile)

	args := []string{"-config", config, "-block-hash-file", locatorFile, "-v"}
	err := doMain(args)
	c.Check(err, NotNil)
	c.Assert(err.Error(), Equals, "Block verification failed for 2 out of 2 blocks with matching prefix.")
	checkErrorLog(c, []string{TestHash, TestHash2}, "Error verifying block", "Block not found")
	c.Assert(strings.Contains(logBuffer.String(), "Verifying block 1 of 2"), Equals, true)
}
コード例 #9
0
ファイル: datamanager_test.go プロジェクト: aflyhorse/arvados
func TearDownDataManagerTest(t *testing.T) {
	arvadostest.StopKeep(2)
	arvadostest.StopAPI()
	summary.WriteDataTo = ""
	collection.HeapProfileFilename = ""
}
コード例 #10
0
ファイル: server_test.go プロジェクト: pombredanne/arvados
func (s *IntegrationSuite) TearDownSuite(c *check.C) {
	arvadostest.StopKeep(2)
	arvadostest.StopAPI()
}
コード例 #11
0
ファイル: keepproxy_test.go プロジェクト: Kunde21/arvados
func (s *ServerRequiredSuite) TearDownSuite(c *C) {
	arvadostest.StopKeep(2)
	arvadostest.StopAPI()
}
コード例 #12
0
func (s *ServerRequiredSuite) TearDownTest(c *C) {
	arvadostest.StopKeep(3)
}
コード例 #13
0
func (s *ServerRequiredSuite) TearDownTest(c *C) {
	arvadostest.StopKeep(2)
	log.SetOutput(os.Stdout)
	log.Printf("%v", logBuffer.String())
}
コード例 #14
0
func TearDownDataManagerTest(t *testing.T) {
	arvadostest.StopKeep()
	arvadostest.StopAPI()
}