浏览文件
storage_volume_darwin_test.go
18 行 · 411 B历史下载| 1 | package cage |
| 2 | |
| 3 | import ( |
| 4 | "os" |
| 5 | "strings" |
| 6 | "testing" |
| 7 | ) |
| 8 | |
| 9 | func TestStorageRefusesVolumeWithIgnoredOwnership(t *testing.T) { |
| 10 | path := os.Getenv("CAGE_TEST_NOOWNERS_VOLUME") |
| 11 | if path == "" { |
| 12 | t.Skip("set CAGE_TEST_NOOWNERS_VOLUME to a test volume mounted noowners") |
| 13 | } |
| 14 | err := localStorageVolume(path) |
| 15 | if err == nil || !strings.Contains(err.Error(), "所有权") { |
| 16 | t.Fatalf("noowners volume check: %v", err) |
| 17 | } |
| 18 | } |

