diff --git a/testutils/resourcebuilder/config/v1/infrastructure.go b/testutils/resourcebuilder/config/v1/infrastructure.go index f81c9332b..cacb3b237 100644 --- a/testutils/resourcebuilder/config/v1/infrastructure.go +++ b/testutils/resourcebuilder/config/v1/infrastructure.go @@ -377,6 +377,17 @@ func (i InfrastructureBuilder) WithGenerateName(generateName string) Infrastruct return i } +// WithInfrastructureName sets the infrastructureName in the status for the infrastructure builder. +func (i InfrastructureBuilder) WithInfrastructureName(infraName string) InfrastructureBuilder { + if i.status == nil { + i.status = &configv1.InfrastructureStatus{} + } + + i.status.InfrastructureName = infraName + + return i +} + // WithLabel sets the labels for the infrastructure builder. func (i InfrastructureBuilder) WithLabel(key, value string) InfrastructureBuilder { if i.labels == nil { @@ -405,3 +416,20 @@ func (i InfrastructureBuilder) WithNamespace(namespace string) InfrastructureBui i.namespace = namespace return i } + +// WithPlatformStatus sets the platformStatus for the infrastructure builder. +func (i InfrastructureBuilder) WithPlatformStatus(ps configv1.PlatformStatus) InfrastructureBuilder { + if i.status == nil { + i.status = &configv1.InfrastructureStatus{} + } + + i.status.PlatformStatus = &ps + + return i +} + +// WithStatus sets the status for the infrastructure builder. +func (i InfrastructureBuilder) WithStatus(status configv1.InfrastructureStatus) InfrastructureBuilder { + i.status = &status + return i +}