mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 21:45:26 +01:00
* Add vault/api to vendor/ * Adds support for sops publish-ing to Vault * Adds support for publishing secrets (unencrypted) to Vault * Adds a new EmitAsMap for TreeBanches * Adds documentation about sops publish-ing to Vault * Initial integration/functional test for publishing to vault
36 lines
1.1 KiB
Go
36 lines
1.1 KiB
Go
// Licensed under the MIT license, see LICENCE file for details.
|
|
|
|
package quicktest
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// BadCheckf returns an error used to report a problem with the checker
|
|
// invocation or testing execution itself (like wrong number or type of
|
|
// arguments) rather than a real Check or Assert failure.
|
|
// This helper can be used when implementing checkers.
|
|
func BadCheckf(format string, a ...interface{}) error {
|
|
e := badCheck(fmt.Sprintf(format, a...))
|
|
return &e
|
|
}
|
|
|
|
// IsBadCheck reports whether the given error has been created by BadCheckf.
|
|
// This helper can be used when implementing checkers.
|
|
func IsBadCheck(err error) bool {
|
|
_, ok := err.(*badCheck)
|
|
return ok
|
|
}
|
|
|
|
type badCheck string
|
|
|
|
// Error implements the error interface.
|
|
func (e *badCheck) Error() string {
|
|
return "bad check: " + string(*e)
|
|
}
|
|
|
|
// ErrSilent is the error used when there is no need to include in the failure
|
|
// output the "error" and "check" keys and all the keys automatically
|
|
// added for args. This helper can be used when implementing checkers.
|
|
var ErrSilent = fmt.Errorf("silent failure")
|