Add test case for ignore-secret tag

This commit is contained in:
Volodymyr Zotov
2025-08-22 11:22:39 -05:00
parent 05ad484bd6
commit 9aac824066
4 changed files with 75 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
package op
import (
"fmt"
"github.com/1Password/onepassword-operator/pkg/testhelper/system"
)
@@ -12,3 +14,12 @@ func UpdateItemPassword(item string) error {
}
return nil
}
// ReadItemPassword reads the password of an item in 1Password
func ReadItemPassword(item, vault string) (string, error) {
output, err := system.Run("op", "read", fmt.Sprintf("op://%s/%s/password", vault, item))
if err != nil {
return "", err
}
return output, nil
}