Documentation ¶
Overview ¶
Package jiritest provides utilities for testing jiri functionality.
Index ¶
- func NewX(t *testing.T) (*jiri.X, func())
- type FakeJiriRoot
- func (fake FakeJiriRoot) AddProject(project project.Project) error
- func (fake FakeJiriRoot) AddTool(tool project.Tool) error
- func (fake FakeJiriRoot) CreateRemoteProject(name string) error
- func (fake FakeJiriRoot) DisableRemoteManifestPush() error
- func (fake FakeJiriRoot) EnableRemoteManifestPush() error
- func (fake FakeJiriRoot) ReadJiriManifest() (*project.Manifest, error)
- func (fake FakeJiriRoot) ReadRemoteManifest() (*project.Manifest, error)
- func (fake FakeJiriRoot) UpdateUniverse(gc bool) error
- func (fake FakeJiriRoot) WriteJiriManifest(manifest *project.Manifest) error
- func (fake FakeJiriRoot) WriteRemoteManifest(manifest *project.Manifest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FakeJiriRoot ¶
type FakeJiriRoot struct { X *jiri.X Projects map[string]string // contains filtered or unexported fields }
FakeJiriRoot sets up a fake JIRI_ROOT under a tmp directory.
func NewFakeJiriRoot ¶
func NewFakeJiriRoot(t *testing.T) (*FakeJiriRoot, func())
NewFakeJiriRoot returns a new FakeJiriRoot and a cleanup closure. The closure must be run to cleanup temporary directories and restore the original environment; typically it is run as a defer function.
func (FakeJiriRoot) AddProject ¶
func (fake FakeJiriRoot) AddProject(project project.Project) error
AddProject adds the given project to a remote manifest.
func (FakeJiriRoot) AddTool ¶
func (fake FakeJiriRoot) AddTool(tool project.Tool) error
AddTool adds the given tool to a remote manifest.
func (FakeJiriRoot) CreateRemoteProject ¶
func (fake FakeJiriRoot) CreateRemoteProject(name string) error
CreateRemoteProject creates a new remote project.
func (FakeJiriRoot) DisableRemoteManifestPush ¶
func (fake FakeJiriRoot) DisableRemoteManifestPush() error
DisableRemoteManifestPush disables pushes to the remote manifest repository.
func (FakeJiriRoot) EnableRemoteManifestPush ¶
func (fake FakeJiriRoot) EnableRemoteManifestPush() error
EnableRemoteManifestPush enables pushes to the remote manifest repository.
func (FakeJiriRoot) ReadJiriManifest ¶
func (fake FakeJiriRoot) ReadJiriManifest() (*project.Manifest, error)
ReadJiriManifest reads the .jiri_manifest manifest.
func (FakeJiriRoot) ReadRemoteManifest ¶
func (fake FakeJiriRoot) ReadRemoteManifest() (*project.Manifest, error)
ReadRemoteManifest read a manifest from the remote manifest project.
func (FakeJiriRoot) UpdateUniverse ¶
func (fake FakeJiriRoot) UpdateUniverse(gc bool) error
UpdateUniverse synchronizes the content of the Vanadium fake based on the content of the remote manifest.
func (FakeJiriRoot) WriteJiriManifest ¶
func (fake FakeJiriRoot) WriteJiriManifest(manifest *project.Manifest) error
WriteJiriManifest writes the given manifest to the .jiri_manifest file.
func (FakeJiriRoot) WriteRemoteManifest ¶
func (fake FakeJiriRoot) WriteRemoteManifest(manifest *project.Manifest) error
WriteRemoteManifest writes the given manifest to the remote manifest project.