MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / CleanFiles

Function CleanFiles

tests/utils/objectstore/objectstore.go:790–801  ·  view source on GitHub ↗

CleanFiles removes every object under the given `bucket[/prefix]` path

(storeEnv *Env, path string)

Source from the content-addressed store, hash-verified

788
789// CleanFiles removes every object under the given `bucket[/prefix]` path
790func CleanFiles(storeEnv *Env, path string) (string, error) {
791 var stdout string
792 stdout, _, err := run.Unchecked(fmt.Sprintf(
793 "kubectl exec -n %v %v -- %v",
794 storeEnv.Namespace,
795 storeEnv.ClientPodRef(),
796 composeCleanFiles(path)))
797 if err != nil {
798 return "", err
799 }
800 return strings.Trim(stdout, "\n"), nil
801}
802
803// GetFilePath gets the glob matching WAL/backup objects in a configured bucket
804func GetFilePath(serverName, fileName string) string {

Callers 2

upgrade_test.goFile · 0.92

Calls 3

UncheckedFunction · 0.92
composeCleanFilesFunction · 0.85
ClientPodRefMethod · 0.80

Tested by

no test coverage detected