MCPcopy
hub / github.com/fluid-cloudnative/fluid / TestCleanUpFuse

Function TestCleanUpFuse

pkg/ctrl/fuse_test.go:118–342  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

116})
117
118func TestCleanUpFuse(t *testing.T) {
119 var testCase = []struct {
120 name string
121 namespace string
122 wantedNodeLabels map[string]map[string]string
123 wantedCount int
124 context cruntime.ReconcileRequestContext
125 log logr.Logger
126 runtimeType string
127 nodeInputs []*corev1.Node
128 }{
129 {
130 wantedCount: 1,
131 name: "hbase",
132 namespace: "fluid",
133 wantedNodeLabels: map[string]map[string]string{
134 "no-fuse": {},
135 "multiple-fuse": {
136 "fluid.io/f-fluid-hadoop": "true",
137 "node-select": "true",
138 "fluid.io/s-fluid-hbase": "true",
139 "fluid.io/s-h-jindo-d-fluid-hbase": "5B",
140 "fluid.io/s-h-jindo-m-fluid-hbase": "1B",
141 "fluid.io/s-h-jindo-t-fluid-hbase": "6B",
142 },
143 "fuse": {
144 "fluid.io/dataset-num": "1",
145 "fluid.io/f-fluid-hadoop": "true",
146 "node-select": "true",
147 },
148 },
149 log: fake.NullLogger(),
150 runtimeType: "jindo",
151 nodeInputs: []*corev1.Node{
152 {
153 ObjectMeta: metav1.ObjectMeta{
154 Name: "no-fuse",
155 Labels: map[string]string{},
156 },
157 },
158 {
159 ObjectMeta: metav1.ObjectMeta{
160 Name: "multiple-fuse",
161 Labels: map[string]string{
162 "fluid.io/f-fluid-hadoop": "true",
163 "node-select": "true",
164 "fluid.io/f-fluid-hbase": "true",
165 "fluid.io/s-fluid-hbase": "true",
166 "fluid.io/s-h-jindo-d-fluid-hbase": "5B",
167 "fluid.io/s-h-jindo-m-fluid-hbase": "1B",
168 "fluid.io/s-h-jindo-t-fluid-hbase": "6B",
169 },
170 },
171 },
172 {
173 ObjectMeta: metav1.ObjectMeta{
174 Name: "fuse",
175 Labels: map[string]string{

Callers

nothing calls this directly

Calls 5

CleanUpFuseMethod · 0.95
NullLoggerFunction · 0.92
NewFakeClientWithSchemeFunction · 0.92
BuildRuntimeInfoFunction · 0.92
DeepCopyMethod · 0.45

Tested by

no test coverage detected