Signed-off-by: Vincent Demeester <vincent@sbr.pm>
| ... | ... |
@@ -8,6 +8,8 @@ import ( |
| 8 | 8 |
"os" |
| 9 | 9 |
"strings" |
| 10 | 10 |
"testing" |
| 11 |
+ |
|
| 12 |
+ selinux "github.com/opencontainers/selinux/go-selinux" |
|
| 11 | 13 |
) |
| 12 | 14 |
|
| 13 | 15 |
func TestMount(t *testing.T) {
|
| ... | ... |
@@ -101,7 +103,11 @@ func TestMount(t *testing.T) {
|
| 101 | 101 |
t.Fatal(err) |
| 102 | 102 |
} |
| 103 | 103 |
defer ensureUnmount(t, target) |
| 104 |
- validateMount(t, target, tc.expectedOpts, tc.expectedOptional, tc.expectedVFS) |
|
| 104 |
+ expectedVFS := tc.expectedVFS |
|
| 105 |
+ if selinux.GetEnabled() && expectedVFS != "" {
|
|
| 106 |
+ expectedVFS = expectedVFS + ",seclabel" |
|
| 107 |
+ } |
|
| 108 |
+ validateMount(t, target, tc.expectedOpts, tc.expectedOptional, expectedVFS) |
|
| 105 | 109 |
}) |
| 106 | 110 |
} |
| 107 | 111 |
} |