MCPcopy Create free account
hub / github.com/containers/image / TestParseWithGraphDriverOptions

Function TestParseWithGraphDriverOptions

storage/storage_test.go:168–188  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

166}
167
168func TestParseWithGraphDriverOptions(t *testing.T) {
169 optionLists := [][]string{
170 {},
171 {"vfs.ignore_chown_errors=true"},
172 {"vfs.ignore_chown_errors=false"},
173 }
174 for _, optionList := range optionLists {
175 store := newStoreWithGraphDriverOptions(t, optionList)
176 ref, err := Transport.ParseStoreReference(store, "test")
177 require.NoError(t, err, optionList)
178 require.NotNil(t, ref)
179 spec := ref.StringWithinTransport()
180 ref2, err := Transport.ParseReference(spec)
181 require.NoError(t, err)
182 require.NotNil(t, ref)
183 sref, ok := ref2.(*storageReference)
184 require.True(t, ok, "transport %s", ref2.Transport().Name())
185 parsedOptions := sref.transport.store.GraphOptions()
186 assert.Equal(t, optionList, parsedOptions)
187 }
188}
189
190// makeLayerGoroutine writes to dest, and on success, updates uncompressedCount and uncompressedDigest
191// before it terminates.

Callers

nothing calls this directly

Calls 6

ParseStoreReferenceMethod · 0.65
StringWithinTransportMethod · 0.65
ParseReferenceMethod · 0.65
NameMethod · 0.65
TransportMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…