base

package
v1.18.0-beta22 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTestingSuite

type BaseTestingSuite struct {
	suite.Suite
	Ctx              context.Context
	TestInstallation *e2e.TestInstallation
	TestHelper       *helper.SoloTestHelper
	TestCase         map[string]*TestCase
	Setup            SimpleTestCase
}

func NewBaseTestingSuite

func NewBaseTestingSuite(ctx context.Context, testInst *e2e.TestInstallation, testHelper *helper.SoloTestHelper, setup SimpleTestCase, testCase map[string]*TestCase) *BaseTestingSuite

func (*BaseTestingSuite) AfterTest

func (s *BaseTestingSuite) AfterTest(suiteName, testName string)

func (*BaseTestingSuite) BeforeTest

func (s *BaseTestingSuite) BeforeTest(suiteName, testName string)

func (*BaseTestingSuite) GetKubectlOutput

func (s *BaseTestingSuite) GetKubectlOutput(command ...string) string

func (*BaseTestingSuite) SetupSuite

func (s *BaseTestingSuite) SetupSuite()

func (*BaseTestingSuite) TearDownSuite

func (s *BaseTestingSuite) TearDownSuite()

func (*BaseTestingSuite) UpgradeWithCustomValuesFile

func (s *BaseTestingSuite) UpgradeWithCustomValuesFile(valuesFile string)

type SimpleTestCase

type SimpleTestCase struct {
	// manifest files
	Manifests []string
	// Resources expected to be created by manifest
	Resources []client.Object
	// values file passed during an upgrade
	UpgradeValues string
	// Rollback method to be called during cleanup.
	// Do not provide this. Calling an upgrade returns this method which we save
	Rollback func() error
}

SimpleTestCase defines the resources used by a specific test

type TestCase

type TestCase struct {
	// SimpleTestCase defines the resources used by a specific test
	SimpleTestCase
	// SubTestCases contains a map for hierarchial tests within the current test
	// Eg: TestRateLimit
	//      |- OnVhost
	//      |- OnRoute
	SubTestCases map[string]*TestCase
}

This defines a test case used by the BaseTestingSuite

Jump to

Keyboard shortcuts

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