@@ -73,7 +73,7 @@ func TestApplyWithSingleFile(t *testing.T) {
73
73
_ , err := e .Apply (context .Background (), "../../examples/single_file/container.hcl" )
74
74
require .NoError (t , err )
75
75
76
- require .Len (t , e .config .Resources , 7 ) // 6 resources in the file plus the image cache and default network
76
+ require .Len (t , e .config .Resources , 7 ) // 6 resources in the file plus the image cache
77
77
78
78
// Check the provider was called for each resource
79
79
require .ElementsMatch (t ,
@@ -149,7 +149,7 @@ func TestApplyWithSingleFileAndVariables(t *testing.T) {
149
149
150
150
_ , err := e .ApplyWithVariables (context .Background (), "../../examples/single_file/container.hcl" , nil , "../../examples/single_file/default.vars" )
151
151
require .NoError (t , err )
152
- require .Len (t , e .config .Resources , 7 ) // 6 resources in the file plus the image cache and default network
152
+ require .Len (t , e .config .Resources , 7 ) // 6 resources in the file plus the image cache
153
153
154
154
// then the container should be created
155
155
require .Equal (t , "consul" , getMetaFromMock (mp , 6 ).Name )
@@ -219,12 +219,12 @@ func TestApplyNotCallsProviderCreateForDisabledResources(t *testing.T) {
219
219
require .NoError (t , err )
220
220
221
221
// should have call create for non disabled resources
222
- testAssertMethodCalled (t , mp , "Create" , 3 ) // ImageCache and default network are always created
222
+ testAssertMethodCalled (t , mp , "Create" , 3 ) // ImageCache are always created
223
223
224
224
// disabled resources should still be added to the state
225
225
sf := testLoadState (t )
226
226
227
- // should contain 3 from the config plus the image cache and default network
227
+ // should contain 3 from the config plus the image cache
228
228
require .Equal (t , 4 , sf .ResourceCount ())
229
229
230
230
// the resource should be in the state but there should be no status
@@ -241,12 +241,12 @@ func TestApplyShouldNotAddDuplicateDisabledResources(t *testing.T) {
241
241
require .NoError (t , err )
242
242
243
243
// should have call create for each provider
244
- testAssertMethodCalled (t , mp , "Create" , 1 ) // ImageCache and default network are always created
244
+ testAssertMethodCalled (t , mp , "Create" , 1 ) // ImageCache are always created
245
245
246
246
// disabled resources should still be added to the state
247
247
sf := testLoadState (t )
248
248
249
- // should contain 3 from the config plus the image cache and default network
249
+ // should contain 3 from the config plus the image cache
250
250
// should not duplicate the disabled container as this already exists in the
251
251
// state
252
252
require .Equal (t , 4 , sf .ResourceCount ())
@@ -266,7 +266,7 @@ func TestApplySetsCreatedStatusForEachResource(t *testing.T) {
266
266
require .Equal (t , 7 , e .config .ResourceCount ())
267
267
268
268
// should only call create and destroy for the cache as this is pending update
269
- testAssertMethodCalled (t , mp , "Create" , 7 ) // ImageCache and default network are always created
269
+ testAssertMethodCalled (t , mp , "Create" , 7 ) // ImageCache are always created
270
270
271
271
sf := testLoadState (t )
272
272
@@ -292,7 +292,7 @@ func TestApplyCallsProviderGenerateErrorStopsExecution(t *testing.T) {
292
292
// should have call create for each provider
293
293
// there are two top level config items, template and network
294
294
// network will fail
295
- // ImageCache and default network should always be created
295
+ // ImageCache should always be created
296
296
testAssertMethodCalled (t , mp , "Create" , 5 )
297
297
298
298
sf := testLoadState (t )
@@ -320,7 +320,7 @@ func TestApplyCallsProviderDestroyAndCreateForFailedResources(t *testing.T) {
320
320
321
321
// should have call create for each provider
322
322
testAssertMethodCalled (t , mp , "Destroy" , 1 )
323
- testAssertMethodCalled (t , mp , "Create" , 7 ) // ImageCache and default network are always created
323
+ testAssertMethodCalled (t , mp , "Create" , 7 ) // ImageCache are always created
324
324
}
325
325
326
326
func TestApplyCallsProviderDestroyForTaintedResources (t * testing.T ) {
@@ -331,7 +331,7 @@ func TestApplyCallsProviderDestroyForTaintedResources(t *testing.T) {
331
331
332
332
// should have call create for each provider
333
333
testAssertMethodCalled (t , mp , "Destroy" , 1 )
334
- testAssertMethodCalled (t , mp , "Create" , 7 ) // ImageCache and default network are always created
334
+ testAssertMethodCalled (t , mp , "Create" , 7 ) // ImageCache are always created
335
335
}
336
336
337
337
func TestApplyCallsProviderDestroyForDisabledResources (t * testing.T ) {
@@ -352,7 +352,7 @@ func TestApplyCallsProviderDestroyForDisabledResources(t *testing.T) {
352
352
353
353
// should have call create for each provider
354
354
testAssertMethodCalled (t , mp , "Destroy" , 1 , r )
355
- testAssertMethodCalled (t , mp , "Create" , 0 ) // ImageCache and default network are always created
355
+ testAssertMethodCalled (t , mp , "Create" , 0 ) // ImageCache are always created
356
356
}
357
357
358
358
func TestApplyCallsProviderRefreshForCreatedResources (t * testing.T ) {
@@ -399,7 +399,7 @@ func TestDestroyNotCallsProviderDestroyForResourcesDisabled(t *testing.T) {
399
399
400
400
// should have call create for each provider
401
401
testAssertMethodCalled (t , mp , "Destroy" , 2 )
402
- testAssertMethodCalled (t , mp , "Create" , 0 ) // ImageCache and default network are always created
402
+ testAssertMethodCalled (t , mp , "Create" , 0 ) // ImageCache are always created
403
403
404
404
// state should be removed
405
405
require .NoFileExists (t , utils .StatePath ())
0 commit comments