jiritest

package
v0.0.0-...-abfb8b1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2016 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package jiritest provides utilities for testing jiri functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewX

func NewX(t *testing.T) (*jiri.X, func())

NewX is similar to jiri.NewX, but is meant for usage in a testing environment.

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.

Jump to

Keyboard shortcuts

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