Documentation ¶
Index ¶
- func AssertTopoSorted(t sktest.TestingT, commits []*repograph.Commit)
- func CommonSetup(t sktest.TestingT) (context.Context, *git_testutils.GitBuilder, func())
- func GitSetup(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, ...) []*repograph.Commit
- func TestBranchMembership(t sktest.TestingT, ctx context.Context, gb *git_testutils.GitBuilder, ...)
- func TestGraphWellFormed(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, ...)
- func TestLogLinear(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, ...)
- func TestRecurse(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, ...)
- func TestRecurseAllBranches(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, ...)
- func TestRevList(t sktest.TestingT, ctx context.Context, gb *git_testutils.GitBuilder, ...)
- func TestUpdateAndReturnCommitDiffs(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, ...)
- func TestUpdateHistoryChanged(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, ...)
- type RepoImplRefresher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertTopoSorted ¶
Assert that the given Commits are in reverse topological order.
func CommonSetup ¶
func CommonSetup(t sktest.TestingT) (context.Context, *git_testutils.GitBuilder, func())
CommonSetup performs common setup. Importantly, it uses the git executable brought in from CIPD.
func GitSetup ¶
func GitSetup(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher) []*repograph.Commit
GitSetup initializes a Git repo in a temporary directory with some commits. Returns the path of the temporary directory, the Graph object associated with the repo, and a slice of the commits which were added.
The repo layout looks like this:
c1--c2------c4--c5--
\-c3-----/
func TestBranchMembership ¶
func TestBranchMembership(t sktest.TestingT, ctx context.Context, gb *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
func TestGraphWellFormed ¶
func TestGraphWellFormed(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
func TestLogLinear ¶
func TestLogLinear(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
func TestRecurse ¶
func TestRecurse(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
func TestRecurseAllBranches ¶
func TestRecurseAllBranches(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
func TestRevList ¶
func TestRevList(t sktest.TestingT, ctx context.Context, gb *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
func TestUpdateAndReturnCommitDiffs ¶
func TestUpdateAndReturnCommitDiffs(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
func TestUpdateHistoryChanged ¶
func TestUpdateHistoryChanged(t sktest.TestingT, ctx context.Context, g *git_testutils.GitBuilder, repo *repograph.Graph, rf RepoImplRefresher)
Types ¶
type RepoImplRefresher ¶
type RepoImplRefresher interface {
Refresh(...*vcsinfo.LongCommit)
}
RepoImplRefresher is an interface used for testing which notifies a RepoImpl that there are new commits available.
Click to show internal directories.
Click to hide internal directories.