MCPcopy Index your code
hub / github.com/docker/docker-agent / newTestSession

Function newTestSession

pkg/remote/pull_test.go:166–180  ·  view source on GitHub ↗
(t *testing.T, opts ...crane.Option)

Source from the content-addressed store, hash-verified

164}
165
166func newTestSession(t *testing.T, opts ...crane.Option) *session {
167 t.Helper()
168 opts = append(opts, crane.Insecure)
169 o := crane.GetOptions(opts...)
170 // Keep the default retry count but drop the default backoff (1s+3s
171 // sleeps): the 429 rate-limit test otherwise idles for ~4s.
172 o.Remote = append(o.Remote, v1remote.WithRetryBackoff(v1remote.Backoff{
173 Duration: time.Millisecond,
174 Factor: 1,
175 Steps: 3,
176 }))
177 s, err := newSession(o)
178 require.NoError(t, err)
179 return s
180}
181
182func TestSessionDigestAnonymousFirst(t *testing.T) {
183 t.Parallel()

Calls 1

newSessionFunction · 0.85

Tested by

no test coverage detected