// getTestStoreConfig returns a configuration, amenable to testing, based on compiled-in engines. func getTestStoreConfig() (*storage.Backend, error) { testableEng := storage.GetTestableEngine() if testableEng == nil { return nil, fmt.Errorf("Could not find a storage engine that was testable") } return testableEng.GetTestConfig() }
// GetTestStoreConfig returns a configuration, amenable to testing, based on compiled-in engines. func GetTestStoreConfig() (*dvid.StoreConfig, error) { testableEng := storage.GetTestableEngine() if testableEng == nil { return nil, fmt.Errorf("Could not find a storage engine that was testable") } dbname := fmt.Sprintf("dvid-test-%x", uuid.NewV4().Bytes()) engConfig := dvid.EngineConfig{Engine: testableEng.GetName(), Path: dbname, Testing: true} return &dvid.StoreConfig{Mutable: engConfig}, nil }
func CloseTest() { dvid.Infof("Closing and deleting test datastore...\n") testableEng := storage.GetTestableEngine() if testableEng == nil { log.Fatalf("Could not find a storage engine that was testable") } config, _ := testStore.backend.StoreConfig("default") testableEng.Delete(config) testStore.Unlock() }
func CloseTest() { dvid.Infof("Closing and deleting test datastore...\n") testableEng := storage.GetTestableEngine() if testableEng == nil { log.Fatalf("Could not find a storage engine that was testable") } testableEng.Delete(testStore.config.Mutable) testStore.Unlock() }