Skip to content

Commit 31baf7a

Browse files
committed
Check /var/run/firecracker-containerd as well
Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent 68d2306 commit 31baf7a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

runtime/service_integ_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,12 @@ func testCreateContainerWithSameName(t *testing.T, vmID string) {
618618
_, err = os.Stat(containerPath)
619619
require.True(t, os.IsNotExist(err))
620620

621+
if len(vmID) != 0 {
622+
shimPath := fmt.Sprintf("%s/default/%s/%s", varRunDir, vmID, containerName)
623+
_, err = os.Stat(shimPath)
624+
require.True(t, os.IsNotExist(err))
625+
}
626+
621627
// So, we can launch a new container with the same name
622628
c2, err := client.NewContainer(ctx,
623629
containerName,
@@ -633,6 +639,12 @@ func testCreateContainerWithSameName(t *testing.T, vmID string) {
633639

634640
_, err = os.Stat(containerPath)
635641
require.True(t, os.IsNotExist(err))
642+
643+
if len(vmID) != 0 {
644+
shimPath := fmt.Sprintf("%s/default/%s/%s", varRunDir, vmID, containerName)
645+
_, err = os.Stat(shimPath)
646+
require.True(t, os.IsNotExist(err))
647+
}
636648
}
637649

638650
func TestCreateContainerWithSameName_Isolated(t *testing.T) {

0 commit comments

Comments
 (0)