forked from cloudfoundry/bosh-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_disk_manager.go
55 lines (45 loc) · 1.52 KB
/
fake_disk_manager.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
51
52
53
54
55
package fakes
import (
boshdisk "github.com/cloudfoundry/bosh-agent/platform/disk"
)
type FakeDiskManager struct {
FakeEphemeralPartitioner *FakePartitioner
FakePersistentPartitioner *FakePartitioner
FakeFormatter *FakeFormatter
FakeMounter *FakeMounter
FakeMountsSearcher *FakeMountsSearcher
FakeRootDevicePartitioner *FakePartitioner
FakeDiskUtil *FakeDiskUtil
}
func NewFakeDiskManager() *FakeDiskManager {
return &FakeDiskManager{
FakeEphemeralPartitioner: NewFakePartitioner(),
FakePersistentPartitioner: NewFakePartitioner(),
FakeFormatter: &FakeFormatter{},
FakeMounter: &FakeMounter{},
FakeMountsSearcher: &FakeMountsSearcher{},
FakeRootDevicePartitioner: NewFakePartitioner(),
FakeDiskUtil: NewFakeDiskUtil(),
}
}
func (m *FakeDiskManager) GetRootDevicePartitioner() boshdisk.Partitioner {
return m.FakeRootDevicePartitioner
}
func (m *FakeDiskManager) GetEphemeralDevicePartitioner() boshdisk.Partitioner {
return m.FakeEphemeralPartitioner
}
func (m *FakeDiskManager) GetPersistentDevicePartitioner() boshdisk.Partitioner {
return m.FakePersistentPartitioner
}
func (m *FakeDiskManager) GetFormatter() boshdisk.Formatter {
return m.FakeFormatter
}
func (m *FakeDiskManager) GetMounter() boshdisk.Mounter {
return m.FakeMounter
}
func (m *FakeDiskManager) GetMountsSearcher() boshdisk.MountsSearcher {
return m.FakeMountsSearcher
}
func (m *FakeDiskManager) GetUtil() boshdisk.Util {
return m.FakeDiskUtil
}