-
Notifications
You must be signed in to change notification settings - Fork 0
/
export_test.go
50 lines (42 loc) · 1.16 KB
/
export_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2014 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package mongo
import (
"github.com/juju/juju/service/common"
)
var (
MakeJournalDirs = makeJournalDirs
MongoConfigPath = &mongoConfigPath
NoauthCommand = noauthCommand
ProcessSignal = &processSignal
SharedSecretPath = sharedSecretPath
SSLKeyPath = sslKeyPath
NewConf = newConf
HostWordSize = &hostWordSize
RuntimeGOOS = &runtimeGOOS
AvailSpace = &availSpace
MinOplogSizeMB = &minOplogSizeMB
MaxOplogSizeMB = &maxOplogSizeMB
PreallocFile = &preallocFile
DefaultOplogSize = defaultOplogSize
FsAvailSpace = fsAvailSpace
PreallocFileSizes = preallocFileSizes
PreallocFiles = preallocFiles
)
func PatchService(patchValue func(interface{}, interface{}), data *ServiceData) {
patchValue(&discoverService, func(name string) (mongoService, error) {
svc := &stubService{
ServiceData: data,
name: name,
}
return svc, nil
})
patchValue(&newService, func(name string, conf common.Conf) (mongoService, error) {
svc := &stubService{
ServiceData: data,
name: name,
conf: conf,
}
return svc, nil
})
}