github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/mongo/export_test.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package mongo 5 6 import ( 7 "github.com/juju/juju/service/common" 8 svctesting "github.com/juju/juju/service/common/testing" 9 ) 10 11 var ( 12 MakeJournalDirs = makeJournalDirs 13 MongoConfigPath = &mongoConfigPath 14 NoauthCommand = noauthCommand 15 ProcessSignal = &processSignal 16 17 SharedSecretPath = sharedSecretPath 18 SSLKeyPath = sslKeyPath 19 20 NewConf = newConf 21 22 HostWordSize = &hostWordSize 23 RuntimeGOOS = &runtimeGOOS 24 AvailSpace = &availSpace 25 MinOplogSizeMB = &minOplogSizeMB 26 MaxOplogSizeMB = &maxOplogSizeMB 27 PreallocFile = &preallocFile 28 29 DefaultOplogSize = defaultOplogSize 30 FsAvailSpace = fsAvailSpace 31 PreallocFileSizes = preallocFileSizes 32 PreallocFiles = preallocFiles 33 ) 34 35 func PatchService(patchValue func(interface{}, interface{}), data *svctesting.FakeServiceData) { 36 patchValue(&discoverService, func(name string) (mongoService, error) { 37 svc := svctesting.NewFakeService(name, common.Conf{}) 38 svc.FakeServiceData = data 39 return svc, nil 40 }) 41 patchValue(&newService, func(name string, conf common.Conf) (mongoService, error) { 42 svc := svctesting.NewFakeService(name, conf) 43 svc.FakeServiceData = data 44 return svc, nil 45 }) 46 }