@@ -94,8 +94,8 @@ func (r *TestResource) Deallocate(value interface{}) error {
94
94
return nil
95
95
}
96
96
97
- func TestEtcdResourceAllocatorDefineResource (t * testing.T ) {
98
- ra := & EtcdResourceAllocator {Etcd : nil }
97
+ func TestEtcdResourceManagerDefineResource (t * testing.T ) {
98
+ ra := & EtcdResourceManager {Etcd : nil }
99
99
ResourceRegistry [testResourceDesc ] = reflect .TypeOf (TestResource {})
100
100
defer func () { delete (ResourceRegistry , testResourceDesc ) }()
101
101
@@ -106,8 +106,8 @@ func TestEtcdResourceAllocatorDefineResource(t *testing.T) {
106
106
}
107
107
}
108
108
109
- func TestEtcdResourceAllocatorDefineInvalidResource (t * testing.T ) {
110
- ra := & EtcdResourceAllocator {Etcd : nil }
109
+ func TestEtcdResourceManagerDefineInvalidResource (t * testing.T ) {
110
+ ra := & EtcdResourceManager {Etcd : nil }
111
111
112
112
gReadCtr = 0
113
113
err := ra .DefineResource (testResourceId , testResourceDesc , & TestResource {})
@@ -120,8 +120,8 @@ func TestEtcdResourceAllocatorDefineInvalidResource(t *testing.T) {
120
120
}
121
121
}
122
122
123
- func TestEtcdResourceAllocatorUndefineResource (t * testing.T ) {
124
- ra := & EtcdResourceAllocator {Etcd : nil }
123
+ func TestEtcdResourceManagerUndefineResource (t * testing.T ) {
124
+ ra := & EtcdResourceManager {Etcd : nil }
125
125
ResourceRegistry [testResourceDesc ] = reflect .TypeOf (TestResource {})
126
126
defer func () { delete (ResourceRegistry , testResourceDesc ) }()
127
127
@@ -137,8 +137,8 @@ func TestEtcdResourceAllocatorUndefineResource(t *testing.T) {
137
137
}
138
138
}
139
139
140
- func TestEtcdResourceAllocatorUndefineInvalidResource (t * testing.T ) {
141
- ra := & EtcdResourceAllocator {Etcd : nil }
140
+ func TestEtcdResourceManagerUndefineInvalidResource (t * testing.T ) {
141
+ ra := & EtcdResourceManager {Etcd : nil }
142
142
143
143
gReadCtr = 0
144
144
err := ra .UndefineResource (testResourceId , testResourceDesc )
@@ -151,8 +151,8 @@ func TestEtcdResourceAllocatorUndefineInvalidResource(t *testing.T) {
151
151
}
152
152
}
153
153
154
- func TestEtcdResourceAllocatorUndefineNonexistentResource (t * testing.T ) {
155
- ra := & EtcdResourceAllocator {Etcd : nil }
154
+ func TestEtcdResourceManagerUndefineNonexistentResource (t * testing.T ) {
155
+ ra := & EtcdResourceManager {Etcd : nil }
156
156
ResourceRegistry [testResourceDesc ] = reflect .TypeOf (TestResource {})
157
157
defer func () { delete (ResourceRegistry , testResourceDesc ) }()
158
158
@@ -167,8 +167,8 @@ func TestEtcdResourceAllocatorUndefineNonexistentResource(t *testing.T) {
167
167
}
168
168
}
169
169
170
- func TestEtcdResourceAllocatorAllocateResource (t * testing.T ) {
171
- ra := & EtcdResourceAllocator {Etcd : nil }
170
+ func TestEtcdResourceManagerAllocateResource (t * testing.T ) {
171
+ ra := & EtcdResourceManager {Etcd : nil }
172
172
ResourceRegistry [testResourceDesc ] = reflect .TypeOf (TestResource {})
173
173
defer func () { delete (ResourceRegistry , testResourceDesc ) }()
174
174
@@ -184,8 +184,8 @@ func TestEtcdResourceAllocatorAllocateResource(t *testing.T) {
184
184
}
185
185
}
186
186
187
- func TestEtcdResourceAllocatorAllocateInvalidResource (t * testing.T ) {
188
- ra := & EtcdResourceAllocator {Etcd : nil }
187
+ func TestEtcdResourceManagerAllocateInvalidResource (t * testing.T ) {
188
+ ra := & EtcdResourceManager {Etcd : nil }
189
189
190
190
gReadCtr = 0
191
191
_ , err := ra .AllocateResourceVal (testResourceId , testResourceDesc )
@@ -198,8 +198,8 @@ func TestEtcdResourceAllocatorAllocateInvalidResource(t *testing.T) {
198
198
}
199
199
}
200
200
201
- func TestEtcdResourceAllocatorAllocateiNonexistentResource (t * testing.T ) {
202
- ra := & EtcdResourceAllocator {Etcd : nil }
201
+ func TestEtcdResourceManagerAllocateiNonexistentResource (t * testing.T ) {
202
+ ra := & EtcdResourceManager {Etcd : nil }
203
203
ResourceRegistry [testResourceDesc ] = reflect .TypeOf (TestResource {})
204
204
defer func () { delete (ResourceRegistry , testResourceDesc ) }()
205
205
@@ -214,8 +214,8 @@ func TestEtcdResourceAllocatorAllocateiNonexistentResource(t *testing.T) {
214
214
}
215
215
}
216
216
217
- func TestEtcdResourceAllocatorDeallocateResource (t * testing.T ) {
218
- ra := & EtcdResourceAllocator {Etcd : nil }
217
+ func TestEtcdResourceManagerDeallocateResource (t * testing.T ) {
218
+ ra := & EtcdResourceManager {Etcd : nil }
219
219
ResourceRegistry [testResourceDesc ] = reflect .TypeOf (TestResource {})
220
220
defer func () { delete (ResourceRegistry , testResourceDesc ) }()
221
221
@@ -236,8 +236,8 @@ func TestEtcdResourceAllocatorDeallocateResource(t *testing.T) {
236
236
}
237
237
}
238
238
239
- func TestEtcdResourceAllocatorDeallocateInvalidResource (t * testing.T ) {
240
- ra := & EtcdResourceAllocator {Etcd : nil }
239
+ func TestEtcdResourceManagerDeallocateInvalidResource (t * testing.T ) {
240
+ ra := & EtcdResourceManager {Etcd : nil }
241
241
242
242
gReadCtr = 0
243
243
err := ra .DeallocateResourceVal (testResourceId , testResourceDesc , 0 )
@@ -250,8 +250,8 @@ func TestEtcdResourceAllocatorDeallocateInvalidResource(t *testing.T) {
250
250
}
251
251
}
252
252
253
- func TestEtcdResourceAllocatorDeallocateiNonexistentResource (t * testing.T ) {
254
- ra := & EtcdResourceAllocator {Etcd : nil }
253
+ func TestEtcdResourceManagerDeallocateiNonexistentResource (t * testing.T ) {
254
+ ra := & EtcdResourceManager {Etcd : nil }
255
255
ResourceRegistry [testResourceDesc ] = reflect .TypeOf (TestResource {})
256
256
defer func () { delete (ResourceRegistry , testResourceDesc ) }()
257
257
0 commit comments