(t *testing.T, options []string)
| 63 | } |
| 64 | |
| 65 | func newStoreWithGraphDriverOptions(t *testing.T, options []string) storage.Store { |
| 66 | wd := t.TempDir() |
| 67 | run := filepath.Join(wd, "run") |
| 68 | root := filepath.Join(wd, "root") |
| 69 | Transport.SetDefaultUIDMap([]idtools.IDMap{{ |
| 70 | ContainerID: 0, |
| 71 | HostID: os.Getuid(), |
| 72 | Size: 1, |
| 73 | }}) |
| 74 | Transport.SetDefaultGIDMap([]idtools.IDMap{{ |
| 75 | ContainerID: 0, |
| 76 | HostID: os.Getgid(), |
| 77 | Size: 1, |
| 78 | }}) |
| 79 | store, err := storage.GetStore(storage.StoreOptions{ |
| 80 | RunRoot: run, |
| 81 | GraphRoot: root, |
| 82 | GraphDriverName: "vfs", |
| 83 | GraphDriverOptions: options, |
| 84 | UIDMap: Transport.DefaultUIDMap(), |
| 85 | GIDMap: Transport.DefaultGIDMap(), |
| 86 | }) |
| 87 | if err != nil { |
| 88 | t.Fatal(err) |
| 89 | } |
| 90 | Transport.SetStore(store) |
| 91 | return store |
| 92 | } |
| 93 | |
| 94 | func newStore(t *testing.T) storage.Store { |
| 95 | return newStoreWithGraphDriverOptions(t, []string{}) |
no test coverage detected
searching dependent graphs…