Skip to content

Commit

Permalink
fix: test that checking out a fake commit fails
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
  • Loading branch information
crenshaw-dev committed Mar 25, 2022
1 parent 35b9e27 commit 03d93c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reposerver/repository/repository_test.go
Expand Up @@ -1810,8 +1810,11 @@ func TestCheckoutRevision(t *testing.T) {
pullSha, err := gitClient.LsRemote("refs/pull/123/head")
require.NoError(t, err)

err = checkoutRevision(gitClient, "does-not-exist", false)
assert.Error(t, err)

err = checkoutRevision(gitClient, pullSha, false)
require.NoError(t, err)
assert.NoError(t, err)
}

// run runs a command in the given working directory. If the command succeeds, it returns the combined standard and
Expand Down

0 comments on commit 03d93c0

Please sign in to comment.