summaryrefslogtreecommitdiffhomepage
path: root/test/root
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-07-26 16:47:13 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-26 16:47:13 -0700
commit9a96e00f0fb0215d604c72485a85c29f75f48ebc (patch)
treecc64ce2ccff4fab8827067172ef30d06fe272749 /test/root
parenta42d3fd0aeb6c67c3fd2fb851845a1f88a298972 (diff)
parentc7ac581049cf623067ff143b76ca20401077ab5f (diff)
Merge pull request #6292 from btw616:local-timezone
PiperOrigin-RevId: 386988406
Diffstat (limited to 'test/root')
-rw-r--r--test/root/chroot_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/root/chroot_test.go b/test/root/chroot_test.go
index 58fcd6f08..5114a9602 100644
--- a/test/root/chroot_test.go
+++ b/test/root/chroot_test.go
@@ -68,13 +68,15 @@ func TestChroot(t *testing.T) {
if err != nil {
t.Fatalf("error listing %q: %v", chroot, err)
}
- if want, got := 1, len(fi); want != got {
+ if want, got := 2, len(fi); want != got {
t.Fatalf("chroot dir got %d entries, want %d", got, want)
}
- // chroot dir is prepared by runsc and should contains only /proc.
- if fi[0].Name() != "proc" {
- t.Errorf("chroot got children %v, want %v", fi[0].Name(), "proc")
+ // chroot dir is prepared by runsc and should contains only /etc and /proc.
+ for i, want := range []string{"etc", "proc"} {
+ if got := fi[i].Name(); got != want {
+ t.Errorf("chroot got child %v, want %v", got, want)
+ }
}
d.CleanUp(ctx)