mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-07-25 01:22:45 +00:00
* Basic end-to-end tests, generate data/backup/remove/restore/verify Uses distributed data generator Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com> * Moved backup/restore into velero_utils, started using a name for the restore Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com> * remove checked in binary and update test/e2e Makefile Signed-off-by: Ashish Amarnath <ashisham@vmware.com> * Ran make update Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com> * Save Signed-off-by: Ashish Amarnath <ashisham@vmware.com> * Ran make update Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com> * Basic end-to-end test, generate data/backup/remove/restore/verify Uses distributed data generator Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com> * Changed tests/e2e Makefile to just use go get to install ginkgo in the GOPATH/bin Updated to ginkgo 1.14.2 Put cobra back to v0.0.7 Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com> * Added CLOUD_PLATFORM env variable to Makefile, updated README, removed ginkgo from .gitignore Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com> * choose velero CLI binary based on local env Signed-off-by: Ashish Amarnath <ashisham@vmware.com> Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
28 lines
727 B
Go
28 lines
727 B
Go
package e2e
|
|
|
|
import (
|
|
"os/exec"
|
|
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
func EnsureClusterExists(ctx context.Context) error {
|
|
return exec.CommandContext(ctx, "kubectl", "cluster-info").Run()
|
|
}
|
|
|
|
func CreateNamespace(ctx context.Context, namespace string) error {
|
|
// TODO - should we talk directly to the API server?
|
|
err := exec.CommandContext(ctx, "kubectl", "create", "namespace", namespace).Run()
|
|
return err
|
|
}
|
|
|
|
func RemoveNamespace(ctx context.Context, namespace string) error {
|
|
// TODO - should we talk directly to the API server?
|
|
err := exec.CommandContext(ctx, "kubectl", "delete", "namespace", namespace).Run()
|
|
return err
|
|
}
|
|
|
|
func NamespaceExists(ctx context.Context, namespace string) (bool, error) {
|
|
return false, nil
|
|
}
|