aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/autoroot_test.go
blob: 7e9d147729b864b7babb7838d165d3f136fff5b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package container

import "testing"

func TestIsAutoRootBindable(t *testing.T) {
	testCases := []struct {
		name string
		want bool
	}{
		{"proc", false},
		{"dev", false},
		{"tmp", false},
		{"mnt", false},
		{"etc", false},
		{"", false},

		{"var", true},
	}
	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			if got := IsAutoRootBindable(tc.name); got != tc.want {
				t.Errorf("IsAutoRootBindable: %v, want %v", got, tc.want)
			}
		})
	}
}