Skip to content

Commit cb1bede

Browse files
committed
Set PATH explicitly
It seems 1.2.x has a conventional PATH by default, but 1.3.x doesn't. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent ea683f5 commit cb1bede

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runtime/service_integ_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func TestShimExitsUponContainerDelete_Isolated(t *testing.T) {
9494
containerd.WithNewSnapshot(snapshotName, image),
9595
containerd.WithNewSpec(
9696
oci.WithProcessArgs("sleep", fmt.Sprintf("%d", testTimeout/time.Second)),
97+
oci.WithDefaultPathEnv,
9798
),
9899
)
99100
require.NoError(t, err, "failed to create container %s", containerName)
@@ -105,6 +106,7 @@ func TestShimExitsUponContainerDelete_Isolated(t *testing.T) {
105106
containerd.WithNewSnapshot(snapshotName, image),
106107
containerd.WithNewSpec(
107108
oci.WithProcessArgs("sleep", fmt.Sprintf("%d", testTimeout/time.Second)),
109+
oci.WithDefaultPathEnv,
108110
),
109111
)
110112
require.Error(t, err, "should not be able to create additional container when no drives are available")
@@ -610,7 +612,7 @@ func testCreateContainerWithSameName(t *testing.T, vmID string) {
610612
require.NoError(t, err)
611613
}
612614

613-
withNewSpec := containerd.WithNewSpec(oci.WithProcessArgs("echo", "hello"), firecrackeroci.WithVMID(vmID))
615+
withNewSpec := containerd.WithNewSpec(oci.WithProcessArgs("echo", "hello"), firecrackeroci.WithVMID(vmID), oci.WithDefaultPathEnv)
614616

615617
client, err := containerd.New(containerdSockPath, containerd.WithDefaultRuntime(firecrackerRuntime))
616618
require.NoError(t, err, "unable to create client to containerd service at %s, is containerd running?", containerdSockPath)
@@ -691,7 +693,7 @@ func TestCreateTooManyContainers_Isolated(t *testing.T) {
691693
image, err := client.Pull(ctx, guestDockerImage, containerd.WithPullUnpack, containerd.WithPullSnapshotter(naiveSnapshotterName))
692694
require.NoError(t, err, "failed to pull image %s, is the the %s snapshotter running?", guestDockerImage, naiveSnapshotterName)
693695

694-
runEchoHello := containerd.WithNewSpec(oci.WithProcessArgs("echo", "-n", "hello"), firecrackeroci.WithVMID("reuse-same-vm"))
696+
runEchoHello := containerd.WithNewSpec(oci.WithProcessArgs("echo", "-n", "hello"), firecrackeroci.WithVMID("reuse-same-vm"), oci.WithDefaultPathEnv)
695697

696698
c1, err := client.NewContainer(ctx,
697699
"c1",

0 commit comments

Comments
 (0)