Add comments on each test helper function

This commit is contained in:
Volodymyr Zotov
2025-08-22 08:30:35 -05:00
parent 904d269e7b
commit bb97134e10
4 changed files with 25 additions and 19 deletions

View File

@@ -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) {