(t *testing.T)
| 164 | } |
| 165 | |
| 166 | func TestRoot(t *testing.T) { |
| 167 | condSkip(t) |
| 168 | pkmountTest(t, func(env *mountEnv) { |
| 169 | f, err := os.Open(env.mountPoint) |
| 170 | if err != nil { |
| 171 | t.Fatal(err) |
| 172 | } |
| 173 | defer f.Close() |
| 174 | names, err := f.Readdirnames(-1) |
| 175 | if err != nil { |
| 176 | t.Fatal(err) |
| 177 | } |
| 178 | sort.Strings(names) |
| 179 | want := []string{"WELCOME.txt", "at", "date", "recent", "roots", "sha1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "sha224-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "tag", "versions"} |
| 180 | if !reflect.DeepEqual(names, want) { |
| 181 | t.Errorf("root directory = %q; want %q", names, want) |
| 182 | } |
| 183 | }) |
| 184 | } |
| 185 | |
| 186 | func TestReadFileFromRoot(t *testing.T) { |
| 187 | condSkip(t) |
nothing calls this directly
no test coverage detected