MCPcopy Create free account
hub / github.com/docker/secrets-engine / ctxAt

Method ctxAt

x/release/command_test.go:99–106  ·  view source on GitHub ↗

ctxAt returns a context after switching the process into the repo dir, so the git helpers (which shell out in the cwd) operate on this repo.

(t *testing.T)

Source from the content-addressed store, hash-verified

97// ctxAt returns a context after switching the process into the repo dir, so the
98// git helpers (which shell out in the cwd) operate on this repo.
99func (r *gitRepo) ctxAt(t *testing.T) context.Context {
100 t.Helper()
101 cwd, err := os.Getwd()
102 require.NoError(t, err)
103 require.NoError(t, os.Chdir(r.dir))
104 t.Cleanup(func() { _ = os.Chdir(cwd) })
105 return t.Context()
106}
107
108func (r *gitRepo) run(t *testing.T, args ...string) {
109 t.Helper()

Callers 1

Test_verifyReleaseRefFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected