Documentation ¶
Index ¶
- func AddApplicationConfig(clusterBom *hubv1.ClusterBom, id string)
- func AddApplicationStatus(clusterBom *hubv1.ClusterBom, id, state string, lastOp *hubv1.LastOperation)
- func CreateClusterBom(clusterBomName, overallState string) *hubv1.ClusterBom
- func CreateDeployItem(clusterBomName, id string, generation, observedGeneration int64, ...) *v1alpha1.DeployItem
- func CreateSecret(name string) *corev1.Secret
- func FakeRawExtensionSampleDi() *runtime.RawExtension
- func FakeRawExtensionWithProperty(name string) *runtime.RawExtension
- func FakeRawExtensionWithPropertyDi(name string) *runtime.RawExtension
- func LastOp(operation string, observedGeneration, successNumber int32, state string, ...) hubv1.LastOperation
- type FakeReconcileClockDi
- type HubControllerTestClientDi
- func (t HubControllerTestClientDi) Create(ctx context.Context, obj client.Object, options ...client.CreateOption) error
- func (t HubControllerTestClientDi) Get(ctx context.Context, cli client.ObjectKey, obj client.Object) error
- func (t HubControllerTestClientDi) GetUncached(ctx context.Context, cli client.ObjectKey, obj client.Object) error
- func (t HubControllerTestClientDi) ListUncached(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (t HubControllerTestClientDi) Update(ctx context.Context, obj client.Object, options ...client.UpdateOption) error
- type ReactiveMockClient
- func (t *ReactiveMockClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (t *ReactiveMockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (t *ReactiveMockClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (t *ReactiveMockClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (t *ReactiveMockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (t *ReactiveMockClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (t *ReactiveMockClient) RESTMapper() meta.RESTMapper
- func (t *ReactiveMockClient) Scheme() *runtime.Scheme
- func (t *ReactiveMockClient) Status() client.StatusWriter
- func (t *ReactiveMockClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ReactiveMockStatusWriter
- type ReactorFuncs
- type TestClientDi
- func (t TestClientDi) Create(context.Context, client.Object, ...client.CreateOption) error
- func (t TestClientDi) Delete(context.Context, client.Object, ...client.DeleteOption) error
- func (t TestClientDi) DeleteAllOf(context.Context, client.Object, ...client.DeleteAllOfOption) error
- func (t TestClientDi) Get(context.Context, client.ObjectKey, client.Object) error
- func (t TestClientDi) List(context.Context, client.ObjectList, ...client.ListOption) error
- func (t TestClientDi) Patch(context.Context, client.Object, client.Patch, ...client.PatchOption) error
- func (t TestClientDi) RESTMapper() meta.RESTMapper
- func (t TestClientDi) Scheme() *runtime.Scheme
- func (t TestClientDi) Status() client.StatusWriter
- func (t TestClientDi) Update(context.Context, client.Object, ...client.UpdateOption) error
- type UnitTestClientDi
- func NewUnitTestClientDi() *UnitTestClientDi
- func NewUnitTestClientWithCBDi(bom *hubv1.ClusterBom) *UnitTestClientDi
- func NewUnitTestClientWithCBandDI(bom *hubv1.ClusterBom, deployItem *v1alpha1.DeployItem) *UnitTestClientDi
- func NewUnitTestClientWithCBandDis(bom *hubv1.ClusterBom, deployItems ...*v1alpha1.DeployItem) *UnitTestClientDi
- func NewUnitTestClientWithDi(deployItem *v1alpha1.DeployItem) *UnitTestClientDi
- func (t UnitTestClientDi) AddClusterBom(bom *hubv1.ClusterBom)
- func (t UnitTestClientDi) AddClusterBomSync(sync *hubv1.ClusterBomSync)
- func (t UnitTestClientDi) AddDeployItem(deployItem *v1alpha1.DeployItem)
- func (t UnitTestClientDi) AddSecret(secret *corev1.Secret)
- func (t UnitTestClientDi) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (t UnitTestClientDi) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (t UnitTestClientDi) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (t UnitTestClientDi) GetUncached(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (t UnitTestClientDi) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (t UnitTestClientDi) ListUncached(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (t UnitTestClientDi) Status() client.StatusWriter
- func (t UnitTestClientDi) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type UnitTestDeleteErrorClientDi
- type UnitTestGetErrorClientDi
- type UnitTestListErrorClientDi
- type UnitTestStatusErrorClientDi
- type UnitTestStatusErrorWriterDi
- type UnitTestStatusWriterDi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddApplicationConfig ¶
func AddApplicationConfig(clusterBom *hubv1.ClusterBom, id string)
func AddApplicationStatus ¶
func AddApplicationStatus(clusterBom *hubv1.ClusterBom, id, state string, lastOp *hubv1.LastOperation)
func CreateClusterBom ¶
func CreateClusterBom(clusterBomName, overallState string) *hubv1.ClusterBom
func CreateDeployItem ¶
func CreateDeployItem(clusterBomName, id string, generation, observedGeneration int64, isInstallOperation bool, lastOp *hubv1.LastOperation, readiness *hubv1.Readiness) *v1alpha1.DeployItem
func CreateSecret ¶
func FakeRawExtensionSampleDi ¶
func FakeRawExtensionSampleDi() *runtime.RawExtension
func FakeRawExtensionWithProperty ¶
func FakeRawExtensionWithProperty(name string) *runtime.RawExtension
func FakeRawExtensionWithPropertyDi ¶
func FakeRawExtensionWithPropertyDi(name string) *runtime.RawExtension
Types ¶
type FakeReconcileClockDi ¶
func (*FakeReconcileClockDi) Now ¶
func (c *FakeReconcileClockDi) Now() time.Time
func (*FakeReconcileClockDi) Sleep ¶
func (c *FakeReconcileClockDi) Sleep(d time.Duration)
type HubControllerTestClientDi ¶
type HubControllerTestClientDi struct { TestClientDi ReconcileMap *corev1.ConfigMap }
func (HubControllerTestClientDi) Create ¶
func (t HubControllerTestClientDi) Create(ctx context.Context, obj client.Object, options ...client.CreateOption) error
func (HubControllerTestClientDi) GetUncached ¶
func (HubControllerTestClientDi) ListUncached ¶
func (t HubControllerTestClientDi) ListUncached(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (HubControllerTestClientDi) Update ¶
func (t HubControllerTestClientDi) Update(ctx context.Context, obj client.Object, options ...client.UpdateOption) error
type ReactiveMockClient ¶
type ReactiveMockClient struct { FakeClient client.Client StatusWriter *ReactiveMockStatusWriter ReactorFuncs }
func NewReactiveMockClient ¶
func NewReactiveMockClient(funcs map[string]func() error, initObjs ...runtime.Object) ReactiveMockClient
func (*ReactiveMockClient) Create ¶
func (t *ReactiveMockClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*ReactiveMockClient) Delete ¶
func (t *ReactiveMockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
Delete deletes the given obj from Kubernetes cluster.
func (*ReactiveMockClient) DeleteAllOf ¶
func (t *ReactiveMockClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
DeleteAllOf deletes all objects of the given type matching the given options.
func (*ReactiveMockClient) Get ¶
func (t *ReactiveMockClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
Get retrieves an obj for the given object key from the Kubernetes Cluster. obj must be a struct pointer so that obj can be updated with the response returned by the Server.
func (*ReactiveMockClient) List ¶
func (t *ReactiveMockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List retrieves list of objects for a given namespace and list options. On a successful call, Items field in the list will be populated with the result returned from the server.
func (*ReactiveMockClient) Patch ¶
func (t *ReactiveMockClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
Patch patches the given obj in the Kubernetes cluster. obj must be a struct pointer so that obj can be updated with the content returned by the Server.
func (*ReactiveMockClient) RESTMapper ¶
func (t *ReactiveMockClient) RESTMapper() meta.RESTMapper
func (*ReactiveMockClient) Scheme ¶
func (t *ReactiveMockClient) Scheme() *runtime.Scheme
func (*ReactiveMockClient) Status ¶
func (t *ReactiveMockClient) Status() client.StatusWriter
func (*ReactiveMockClient) Update ¶
func (t *ReactiveMockClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Update updates the given obj in the Kubernetes cluster. obj must be a struct pointer so that obj can be updated with the content returned by the Server.
type ReactiveMockStatusWriter ¶
type ReactiveMockStatusWriter struct { ReactorFuncs FakeClient client.StatusWriter }
func (*ReactiveMockStatusWriter) Patch ¶
func (t *ReactiveMockStatusWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
Patch patches the given object's subresource. obj must be a struct pointer so that obj can be updated with the content returned by the Server.
func (*ReactiveMockStatusWriter) Update ¶
func (t *ReactiveMockStatusWriter) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type ReactorFuncs ¶
type TestClientDi ¶
type TestClientDi struct { }
func (TestClientDi) Create ¶
func (t TestClientDi) Create(context.Context, client.Object, ...client.CreateOption) error
func (TestClientDi) Delete ¶
func (t TestClientDi) Delete(context.Context, client.Object, ...client.DeleteOption) error
func (TestClientDi) DeleteAllOf ¶
func (t TestClientDi) DeleteAllOf(context.Context, client.Object, ...client.DeleteAllOfOption) error
func (TestClientDi) List ¶
func (t TestClientDi) List(context.Context, client.ObjectList, ...client.ListOption) error
func (TestClientDi) Patch ¶
func (t TestClientDi) Patch(context.Context, client.Object, client.Patch, ...client.PatchOption) error
func (TestClientDi) RESTMapper ¶
func (t TestClientDi) RESTMapper() meta.RESTMapper
func (TestClientDi) Scheme ¶
func (t TestClientDi) Scheme() *runtime.Scheme
func (TestClientDi) Status ¶
func (t TestClientDi) Status() client.StatusWriter
func (TestClientDi) Update ¶
func (t TestClientDi) Update(context.Context, client.Object, ...client.UpdateOption) error
type UnitTestClientDi ¶
type UnitTestClientDi struct { TestClientDi ClusterBoms map[string]*hubv1.ClusterBom DeployItems map[string]*v1alpha1.DeployItem Installations map[string]*v1alpha1.Installation Secrets map[string]*corev1.Secret ClusterBomSyncs map[string]*hubv1.ClusterBomSync }
Begin Unit Test Client that holds object in memory to be used as client mock
func NewUnitTestClientDi ¶
func NewUnitTestClientDi() *UnitTestClientDi
func NewUnitTestClientWithCBDi ¶
func NewUnitTestClientWithCBDi(bom *hubv1.ClusterBom) *UnitTestClientDi
func NewUnitTestClientWithCBandDI ¶
func NewUnitTestClientWithCBandDI(bom *hubv1.ClusterBom, deployItem *v1alpha1.DeployItem) *UnitTestClientDi
func NewUnitTestClientWithCBandDis ¶
func NewUnitTestClientWithCBandDis(bom *hubv1.ClusterBom, deployItems ...*v1alpha1.DeployItem) *UnitTestClientDi
func NewUnitTestClientWithDi ¶
func NewUnitTestClientWithDi(deployItem *v1alpha1.DeployItem) *UnitTestClientDi
func (UnitTestClientDi) AddClusterBom ¶
func (t UnitTestClientDi) AddClusterBom(bom *hubv1.ClusterBom)
func (UnitTestClientDi) AddClusterBomSync ¶
func (t UnitTestClientDi) AddClusterBomSync(sync *hubv1.ClusterBomSync)
func (UnitTestClientDi) AddDeployItem ¶
func (t UnitTestClientDi) AddDeployItem(deployItem *v1alpha1.DeployItem)
func (UnitTestClientDi) AddSecret ¶
func (t UnitTestClientDi) AddSecret(secret *corev1.Secret)
func (UnitTestClientDi) Create ¶
func (t UnitTestClientDi) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (UnitTestClientDi) Delete ¶
func (t UnitTestClientDi) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (UnitTestClientDi) GetUncached ¶
func (UnitTestClientDi) List ¶
func (t UnitTestClientDi) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (UnitTestClientDi) ListUncached ¶
func (t UnitTestClientDi) ListUncached(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (UnitTestClientDi) Status ¶
func (t UnitTestClientDi) Status() client.StatusWriter
func (UnitTestClientDi) Update ¶
func (t UnitTestClientDi) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type UnitTestDeleteErrorClientDi ¶
type UnitTestDeleteErrorClientDi struct {
UnitTestClientDi
}
UnitTestDeleteErrorClient is a UnitTestClient whose Delete method fails.
func NewUnitTestDeleteErrorClientDi ¶
func NewUnitTestDeleteErrorClientDi() *UnitTestDeleteErrorClientDi
func (UnitTestDeleteErrorClientDi) Delete ¶
func (t UnitTestDeleteErrorClientDi) Delete(context.Context, client.Object, ...client.DeleteOption) error
type UnitTestGetErrorClientDi ¶
type UnitTestGetErrorClientDi struct {
UnitTestClientDi
}
UnitTestGetErrorClient is a UnitTestClient whose Get method fails.
func NewUnitTestGetErrorClientDi ¶
func NewUnitTestGetErrorClientDi() *UnitTestGetErrorClientDi
type UnitTestListErrorClientDi ¶
type UnitTestListErrorClientDi struct {
UnitTestClientDi
}
UnitTestListErrorClient is a UnitTestClient whose List method fails.
func NewUnitTestListErrorClientDi ¶
func NewUnitTestListErrorClientDi() *UnitTestListErrorClientDi
func (UnitTestListErrorClientDi) List ¶
func (t UnitTestListErrorClientDi) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
type UnitTestStatusErrorClientDi ¶
type UnitTestStatusErrorClientDi struct {
UnitTestClientDi
}
UnitTestStatusErrorClient is a UnitTestClient whose Status method return a UnitTestStatusErrorWriter.
func NewUnitTestStatusErrorClientDi ¶
func NewUnitTestStatusErrorClientDi() *UnitTestStatusErrorClientDi
func (UnitTestStatusErrorClientDi) Status ¶
func (t UnitTestStatusErrorClientDi) Status() client.StatusWriter
type UnitTestStatusErrorWriterDi ¶
type UnitTestStatusErrorWriterDi struct { }
UnitTestStatusErrorWriter is a StatusWriter whose Update method fails.
func (*UnitTestStatusErrorWriterDi) Patch ¶
func (w *UnitTestStatusErrorWriterDi) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*UnitTestStatusErrorWriterDi) Update ¶
func (w *UnitTestStatusErrorWriterDi) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type UnitTestStatusWriterDi ¶
type UnitTestStatusWriterDi struct {
// contains filtered or unexported fields
}
func (*UnitTestStatusWriterDi) Patch ¶
func (w *UnitTestStatusWriterDi) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*UnitTestStatusWriterDi) Update ¶
func (w *UnitTestStatusWriterDi) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error