e2e

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestTimeout = time.Minute * 3
)

Variables

This section is empty.

Functions

func GetKubeConfig

func GetKubeConfig(configPath string, overrides clientcmd.ConfigOverrides) *rest.Config

GetKubeConfig creates new kubernetes client config using specified config path and config overrides variables

func WaitUntil added in v0.4.0

func WaitUntil(t *testing.T, condition wait.ConditionFunc)

WaitUntil periodically executes specified condition until it returns true.

Types

type FakeGitClient

type FakeGitClient struct {
	// contains filtered or unexported fields
}

FakeGitClient is a test git client implementation which always clone local test repo.

func (*FakeGitClient) Checkout

func (c *FakeGitClient) Checkout(revision string) error

func (*FakeGitClient) CommitSHA added in v0.3.0

func (c *FakeGitClient) CommitSHA() (string, error)

func (*FakeGitClient) Fetch added in v0.4.0

func (c *FakeGitClient) Fetch() error

func (*FakeGitClient) Init added in v0.4.0

func (c *FakeGitClient) Init() error

func (*FakeGitClient) LsFiles added in v0.4.4

func (c *FakeGitClient) LsFiles(s string) ([]string, error)

func (*FakeGitClient) LsRemote added in v0.4.0

func (c *FakeGitClient) LsRemote(s string) (string, error)

func (*FakeGitClient) Reset

func (c *FakeGitClient) Reset() error

func (*FakeGitClient) Root added in v0.4.0

func (c *FakeGitClient) Root() string

type FakeGitClientFactory added in v0.4.0

type FakeGitClientFactory struct{}

func (*FakeGitClientFactory) NewClient added in v0.4.0

func (f *FakeGitClientFactory) NewClient(repoURL, path, username, password, sshPrivateKey string) git.Client

type Fixture

type Fixture struct {
	Config            *rest.Config
	KubeClient        kubernetes.Interface
	ExtensionsClient  apiextensionsclient.Interface
	AppClient         appclientset.Interface
	DB                db.ArgoDB
	Namespace         string
	InstanceID        string
	RepoServerAddress string
	ApiServerAddress  string
	// contains filtered or unexported fields
}

Fixture represents e2e tests fixture.

func NewFixture

func NewFixture() (*Fixture, error)

NewFixture creates e2e tests fixture: ensures that Application CRD is installed, creates temporal namespace, starts repo and api server, configure currently available cluster.

func (*Fixture) CreateApp

func (f *Fixture) CreateApp(t *testing.T, application *v1alpha1.Application) *v1alpha1.Application

CreateApp creates application with appropriate controller instance id.

func (*Fixture) NewApiClientset added in v0.4.0

func (f *Fixture) NewApiClientset() (argocdclient.Client, error)

func (*Fixture) RunCli added in v0.4.0

func (f *Fixture) RunCli(args ...string) (string, error)

func (*Fixture) TearDown

func (f *Fixture) TearDown()

TearDown deletes fixture resources.

Jump to

Keyboard shortcuts

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