shared_tests

package
v0.0.0-...-47e0bda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertTopoSorted

func AssertTopoSorted(t sktest.TestingT, commits []*repograph.Commit)

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

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 TestUpdateAndReturnCommitDiffs

func TestUpdateAndReturnCommitDiffs(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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL