Skip to content

Commit fbe37a6

Browse files
committed
rename test
1 parent 9a63c8f commit fbe37a6

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

pkg/clients/container/docker_tasks_container_create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func TestContainerRollsbackWhenUnableToConnectToNetwork(t *testing.T) {
268268
md.AssertCalled(t, "ContainerRemove", mock.Anything, mock.Anything, mock.Anything)
269269
}
270270

271-
func TestContainerOnlyAttachesToDefaultNetworkWhenNil(t *testing.T) {
271+
func TestContainerDoesNOTAttachesToUserNetworkWhenNil(t *testing.T) {
272272
cc, md, mic := createContainerConfig()
273273
cc.Networks = []dtypes.NetworkAttachment{}
274274

pkg/jumppad/engine_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestApplyWithSingleFile(t *testing.T) {
7373
_, err := e.Apply(context.Background(), "../../examples/single_file/container.hcl")
7474
require.NoError(t, err)
7575

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
7777

7878
// Check the provider was called for each resource
7979
require.ElementsMatch(t,
@@ -149,7 +149,7 @@ func TestApplyWithSingleFileAndVariables(t *testing.T) {
149149

150150
_, err := e.ApplyWithVariables(context.Background(), "../../examples/single_file/container.hcl", nil, "../../examples/single_file/default.vars")
151151
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
153153

154154
// then the container should be created
155155
require.Equal(t, "consul", getMetaFromMock(mp, 6).Name)
@@ -219,12 +219,12 @@ func TestApplyNotCallsProviderCreateForDisabledResources(t *testing.T) {
219219
require.NoError(t, err)
220220

221221
// 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
223223

224224
// disabled resources should still be added to the state
225225
sf := testLoadState(t)
226226

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
228228
require.Equal(t, 4, sf.ResourceCount())
229229

230230
// the resource should be in the state but there should be no status
@@ -241,12 +241,12 @@ func TestApplyShouldNotAddDuplicateDisabledResources(t *testing.T) {
241241
require.NoError(t, err)
242242

243243
// 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
245245

246246
// disabled resources should still be added to the state
247247
sf := testLoadState(t)
248248

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
250250
// should not duplicate the disabled container as this already exists in the
251251
// state
252252
require.Equal(t, 4, sf.ResourceCount())
@@ -266,7 +266,7 @@ func TestApplySetsCreatedStatusForEachResource(t *testing.T) {
266266
require.Equal(t, 7, e.config.ResourceCount())
267267

268268
// 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
270270

271271
sf := testLoadState(t)
272272

@@ -292,7 +292,7 @@ func TestApplyCallsProviderGenerateErrorStopsExecution(t *testing.T) {
292292
// should have call create for each provider
293293
// there are two top level config items, template and network
294294
// network will fail
295-
// ImageCache and default network should always be created
295+
// ImageCache should always be created
296296
testAssertMethodCalled(t, mp, "Create", 5)
297297

298298
sf := testLoadState(t)
@@ -320,7 +320,7 @@ func TestApplyCallsProviderDestroyAndCreateForFailedResources(t *testing.T) {
320320

321321
// should have call create for each provider
322322
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
324324
}
325325

326326
func TestApplyCallsProviderDestroyForTaintedResources(t *testing.T) {
@@ -331,7 +331,7 @@ func TestApplyCallsProviderDestroyForTaintedResources(t *testing.T) {
331331

332332
// should have call create for each provider
333333
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
335335
}
336336

337337
func TestApplyCallsProviderDestroyForDisabledResources(t *testing.T) {
@@ -352,7 +352,7 @@ func TestApplyCallsProviderDestroyForDisabledResources(t *testing.T) {
352352

353353
// should have call create for each provider
354354
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
356356
}
357357

358358
func TestApplyCallsProviderRefreshForCreatedResources(t *testing.T) {
@@ -399,7 +399,7 @@ func TestDestroyNotCallsProviderDestroyForResourcesDisabled(t *testing.T) {
399399

400400
// should have call create for each provider
401401
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
403403

404404
// state should be removed
405405
require.NoFileExists(t, utils.StatePath())

0 commit comments

Comments
 (0)