mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-23 07:58:04 +00:00
Add comments on each test helper function
This commit is contained in:
@@ -11,22 +11,24 @@ import (
|
||||
"github.com/1Password/onepassword-operator/pkg/testhelper/system"
|
||||
)
|
||||
|
||||
// BuildOperatorImage builds the Operator image using `make docker-build`
|
||||
func BuildOperatorImage() {
|
||||
By("building the Operator image")
|
||||
By("Building the Operator image")
|
||||
_, err := system.Run("make", "docker-build")
|
||||
ExpectWithOffset(1, err).NotTo(HaveOccurred())
|
||||
}
|
||||
|
||||
// DeployOperator deploys the Onepassword Operator in the default namespace.
|
||||
// DeployOperator deploys the Operator in the default namespace.
|
||||
// It waits for the operator pod to be in 'Running' state.
|
||||
// All the resources created using manifests in `config/` dir.
|
||||
// To make the operator use Connect or Service Accounts, patch `config/manager/manager.yaml`
|
||||
func DeployOperator() {
|
||||
By("deploying the Operator")
|
||||
By("Deploying the Operator")
|
||||
_, err := system.Run("make", "deploy")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
}
|
||||
|
||||
// WaitingForOperatorPod waits for the Operator pod to be in 'Running' state
|
||||
func WaitingForOperatorPod() {
|
||||
By("Waiting for the Operator pod to be 'Running'")
|
||||
Eventually(func(g Gomega) {
|
||||
@@ -38,6 +40,7 @@ func WaitingForOperatorPod() {
|
||||
}, 30*time.Second, 1*time.Second).Should(Succeed())
|
||||
}
|
||||
|
||||
// WaitingForConnectPod waits for the Connect pod to be in 'Running' state
|
||||
func WaitingForConnectPod() {
|
||||
By("Waiting for the Connect pod to be 'Running'")
|
||||
Eventually(func(g Gomega) {
|
||||
|
Reference in New Issue
Block a user