e2e

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: Apache-2.0 Imports: 23 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 PollUntil

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

PollUntil periodically executes specified condition until it returns true.

Types

type FakeGitClient

type FakeGitClient struct {
}

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

func (*FakeGitClient) Checkout

func (c *FakeGitClient) Checkout(repoPath string, sha string) (string, error)

func (*FakeGitClient) CloneOrFetch

func (c *FakeGitClient) CloneOrFetch(repo string, username string, password string, sshPrivateKey string, repoPath string) error

func (*FakeGitClient) CommitSHA added in v0.3.0

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

func (*FakeGitClient) Reset

func (c *FakeGitClient) Reset(repoPath string) error

type Fixture

type Fixture struct {
	Config           *rest.Config
	KubeClient       kubernetes.Interface
	ExtensionsClient apiextensionsclient.Interface
	AppClient        appclientset.Interface
	ApiRepoService   apirepository.RepositoryServiceServer
	RepoClientset    reposerver.Clientset
	AppComparator    controller.AppComparator
	Namespace        string
	InstanceID       string
	// contains filtered or unexported fields
}

Fixture represents e2e tests fixture.

func NewFixture

func NewFixture() (*Fixture, error)

NewFixture creates e2e tests fixture.

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) CreateController

func (f *Fixture) CreateController() *controller.ApplicationController

CreateController creates new controller instance

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