diff --git a/test/provisioner/provision.go b/test/provisioner/provision.go index 5420b6fd96..0f0d6602a9 100644 --- a/test/provisioner/provision.go +++ b/test/provisioner/provision.go @@ -10,7 +10,6 @@ import ( "crypto/x509" "encoding/pem" "fmt" - "io" "os" "os/exec" "path/filepath" @@ -78,23 +77,6 @@ type InstallOverlay interface { Edit(ctx context.Context, cfg *envconf.Config, properties map[string]string) error } -func runCommand(command string, stdout io.Writer, stderr io.Writer, args ...string) error { - cmd := exec.Command(command, args...) - cmd.Stdout = stdout - cmd.Stderr = stderr - - fmt.Printf("Running command: %s %v\n", command, args) - - if err := cmd.Run(); err != nil { - err = fmt.Errorf(fmt.Sprintf("Error running command: %s %v - %s", command, args, err)) - - log.Errorf("%v", err) - return err - } - - return nil -} - func saveToFile(filename string, content []byte) error { // Save contents to file err := os.WriteFile(filename, content, 0644) @@ -105,13 +87,6 @@ func saveToFile(filename string, content []byte) error { } func NewKeyBrokerService(clusterName string) (*KeyBrokerService, error) { - // Clone kbs repo - repoURL := "https://github.com/confidential-containers/kbs" - - if err := runCommand("git", os.Stdout, os.Stderr, "clone", repoURL); err != nil { - return nil, err - } - log.Info("creating key.bin") // Create secret @@ -420,16 +395,6 @@ func (p *KeyBrokerService) Delete(ctx context.Context, cfg *envconf.Config) erro return err } - // remove kbs repo - directoryPath := "kbs" - - err = os.RemoveAll(directoryPath) - if err != nil { - err = fmt.Errorf("Error deleting directory: %w\n", err) - log.Errorf("%v", err) - return err - } - return nil }