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

Function TestStatusClean

pkg/worktree/worktree_test.go:211–224  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

209}
210
211func TestStatusClean(t *testing.T) {
212 t.Parallel()
213 dir := bootstrapRepo(t)
214
215 wt, err := Create(t.Context(), dir, "clean", WithRoot(t.TempDir()))
216 require.NoError(t, err)
217
218 st, err := wt.Status(t.Context())
219 require.NoError(t, err)
220 assert.False(t, st.IsDirty())
221 assert.False(t, st.Modified)
222 assert.False(t, st.Untracked)
223 assert.False(t, st.NewCommits)
224}
225
226func TestStatusDetectsUntracked(t *testing.T) {
227 t.Parallel()

Callers

nothing calls this directly

Calls 6

CreateFunction · 0.85
WithRootFunction · 0.85
ContextMethod · 0.80
StatusMethod · 0.80
IsDirtyMethod · 0.80
bootstrapRepoFunction · 0.70

Tested by

no test coverage detected