Documentation ¶
Index ¶
- Constants
- Variables
- type AllLogLevelEnabler
- type IntegrationTestSuite
- type WithContextSuiteHelper
- func (s *WithContextSuiteHelper) CreateContext(context *v1beta1.Context) error
- func (s *WithContextSuiteHelper) CreateTestContext() (*v1beta1.Context, error)
- func (s *WithContextSuiteHelper) DeleteContext(context *v1beta1.Context)
- func (s *WithContextSuiteHelper) WaitUntilContextExists(context *v1beta1.Context) bool
- func (s *WithContextSuiteHelper) WaitUntilContextRemoved(context *v1beta1.Context) bool
- type WithEventHelper
- type WithPolicySuiteHelper
- type WithRunSuiteHelper
- type WithSpaceSuiteHelper
- func (s *WithSpaceSuiteHelper) CreateSpace(space *v1beta1.Space) (*v1beta1.Space, error)
- func (s *WithSpaceSuiteHelper) CreateTestSpace() (*v1beta1.Space, error)
- func (s *WithSpaceSuiteHelper) CreateTestSpaceWithStatus() (*v1beta1.Space, error)
- func (s *WithSpaceSuiteHelper) DeleteSpace(space *v1beta1.Space)
- func (s *WithSpaceSuiteHelper) WaitUntilSpaceRemoved(space *v1beta1.Space)
- type WithStackSuiteHelper
- func (s *WithStackSuiteHelper) CreateStack(stack *v1beta1.Stack) (*v1beta1.Stack, error)
- func (s *WithStackSuiteHelper) CreateTestStack() (*v1beta1.Stack, error)
- func (s *WithStackSuiteHelper) CreateTestStackWithStatus() (*v1beta1.Stack, error)
- func (s *WithStackSuiteHelper) DeleteStack(stack *v1beta1.Stack)
- func (s *WithStackSuiteHelper) GetStackOutput(stack *v1beta1.Stack) (*v1.Secret, error)
- func (s *WithStackSuiteHelper) WaitUntilStackExists(stack *v1beta1.Stack) bool
- func (s *WithStackSuiteHelper) WaitUntilStackRemoved(stack *v1beta1.Stack) bool
Constants ¶
View Source
const ( DefaultTimeout = 10 * time.Second DefaultInterval = 100 * time.Millisecond )
Variables ¶
View Source
var DefaultValidContext = v1beta1.Context{ TypeMeta: metav1.TypeMeta{ Kind: "Context", APIVersion: v1beta1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Name: "test-context", Namespace: "default", }, Spec: v1beta1.ContextSpec{ SpaceId: utils.AddressOf("test-space-id"), }, }
View Source
var DefaultValidPolicy = v1beta1.Policy{ TypeMeta: metav1.TypeMeta{ Kind: "Policy", APIVersion: v1beta1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ GenerateName: "test-policy", Namespace: "default", }, Spec: v1beta1.PolicySpec{ Body: "package spacelift", Type: "PLAN", }, }
View Source
var DefaultValidRun = v1beta1.Run{ TypeMeta: metav1.TypeMeta{ Kind: "Run", APIVersion: v1beta1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ GenerateName: "test-run", Namespace: "default", }, Spec: v1beta1.RunSpec{ StackName: "test-stack", }, }
View Source
var DefaultValidStack = v1beta1.Stack{ TypeMeta: metav1.TypeMeta{ Kind: "Stack", APIVersion: v1beta1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Name: "test-stack", Namespace: "default", }, Spec: v1beta1.StackSpec{ Branch: utils.AddressOf("fake-branch"), Repository: "fake-repository", SpaceId: utils.AddressOf("fake-space"), }, }
View Source
var DefaultValidStackStatus = v1beta1.StackStatus{
Id: "test-stack-id",
}
Functions ¶
This section is empty.
Types ¶
type AllLogLevelEnabler ¶
type AllLogLevelEnabler struct{}
AllLogLevelEnabler is a simple log level enabled that allows to grap logs from all kind of levels
type IntegrationTestSuite ¶
type IntegrationTestSuite struct { suite.Suite SetupManager func(manager.Manager) Logs *observer.ObservedLogs FakeSpaceliftRunRepo *mocks.RunRepository FakeSpaceliftStackRepo *mocks.StackRepository FakeSpaceliftSpaceRepo *mocks.SpaceRepository FakeSpaceliftContextRepo *mocks.ContextRepository FakeSpaceliftPolicyRepo *mocks.PolicyRepository RunRepo *repository.RunRepository StackRepo *repository.StackRepository SpaceRepo *repository.SpaceRepository ContextRepo *repository.ContextRepository SecretRepo *repository.SecretRepository PolicyRepo *repository.PolicyRepository // contains filtered or unexported fields }
func (*IntegrationTestSuite) Client ¶
func (s *IntegrationTestSuite) Client() client.Client
func (*IntegrationTestSuite) Context ¶
func (s *IntegrationTestSuite) Context() context.Context
func (*IntegrationTestSuite) SetupSuite ¶
func (s *IntegrationTestSuite) SetupSuite()
func (*IntegrationTestSuite) SetupTest ¶
func (s *IntegrationTestSuite) SetupTest()
func (*IntegrationTestSuite) TearDownSuite ¶
func (s *IntegrationTestSuite) TearDownSuite()
type WithContextSuiteHelper ¶
type WithContextSuiteHelper struct {
*IntegrationTestSuite
}
func (*WithContextSuiteHelper) CreateContext ¶
func (s *WithContextSuiteHelper) CreateContext(context *v1beta1.Context) error
func (*WithContextSuiteHelper) CreateTestContext ¶
func (s *WithContextSuiteHelper) CreateTestContext() (*v1beta1.Context, error)
func (*WithContextSuiteHelper) DeleteContext ¶
func (s *WithContextSuiteHelper) DeleteContext(context *v1beta1.Context)
func (*WithContextSuiteHelper) WaitUntilContextExists ¶
func (s *WithContextSuiteHelper) WaitUntilContextExists(context *v1beta1.Context) bool
func (*WithContextSuiteHelper) WaitUntilContextRemoved ¶
func (s *WithContextSuiteHelper) WaitUntilContextRemoved(context *v1beta1.Context) bool
type WithEventHelper ¶
type WithEventHelper struct {
*IntegrationTestSuite
}
func (*WithEventHelper) FindEvents ¶
func (s *WithEventHelper) FindEvents(object types.NamespacedName, reason string) ([]v1.Event, error)
type WithPolicySuiteHelper ¶
type WithPolicySuiteHelper struct {
*IntegrationTestSuite
}
func (*WithPolicySuiteHelper) CreatePolicy ¶
func (s *WithPolicySuiteHelper) CreatePolicy(policy *v1beta1.Policy) error
func (*WithPolicySuiteHelper) CreateTestPolicy ¶
func (s *WithPolicySuiteHelper) CreateTestPolicy() (*v1beta1.Policy, error)
func (*WithPolicySuiteHelper) DeletePolicy ¶
func (s *WithPolicySuiteHelper) DeletePolicy(policy *v1beta1.Policy) error
type WithRunSuiteHelper ¶
type WithRunSuiteHelper struct {
*IntegrationTestSuite
}
func (*WithRunSuiteHelper) AssertRunState ¶
func (*WithRunSuiteHelper) CreateRun ¶
func (s *WithRunSuiteHelper) CreateRun(run *v1beta1.Run) error
func (*WithRunSuiteHelper) CreateTestRun ¶
func (s *WithRunSuiteHelper) CreateTestRun() (*v1beta1.Run, error)
type WithSpaceSuiteHelper ¶
type WithSpaceSuiteHelper struct {
*IntegrationTestSuite
}
func (*WithSpaceSuiteHelper) CreateSpace ¶
func (*WithSpaceSuiteHelper) CreateTestSpace ¶
func (s *WithSpaceSuiteHelper) CreateTestSpace() (*v1beta1.Space, error)
func (*WithSpaceSuiteHelper) CreateTestSpaceWithStatus ¶
func (s *WithSpaceSuiteHelper) CreateTestSpaceWithStatus() (*v1beta1.Space, error)
func (*WithSpaceSuiteHelper) DeleteSpace ¶
func (s *WithSpaceSuiteHelper) DeleteSpace(space *v1beta1.Space)
func (*WithSpaceSuiteHelper) WaitUntilSpaceRemoved ¶
func (s *WithSpaceSuiteHelper) WaitUntilSpaceRemoved(space *v1beta1.Space)
type WithStackSuiteHelper ¶
type WithStackSuiteHelper struct {
*IntegrationTestSuite
}
func (*WithStackSuiteHelper) CreateStack ¶
func (*WithStackSuiteHelper) CreateTestStack ¶
func (s *WithStackSuiteHelper) CreateTestStack() (*v1beta1.Stack, error)
func (*WithStackSuiteHelper) CreateTestStackWithStatus ¶
func (s *WithStackSuiteHelper) CreateTestStackWithStatus() (*v1beta1.Stack, error)
func (*WithStackSuiteHelper) DeleteStack ¶
func (s *WithStackSuiteHelper) DeleteStack(stack *v1beta1.Stack)
func (*WithStackSuiteHelper) GetStackOutput ¶
func (*WithStackSuiteHelper) WaitUntilStackExists ¶
func (s *WithStackSuiteHelper) WaitUntilStackExists(stack *v1beta1.Stack) bool
func (*WithStackSuiteHelper) WaitUntilStackRemoved ¶
func (s *WithStackSuiteHelper) WaitUntilStackRemoved(stack *v1beta1.Stack) bool
Click to show internal directories.
Click to hide internal directories.