Skip to content

Commit

Permalink
Removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
nitishSr committed Feb 2, 2022
1 parent 17c8dc2 commit 5c8dc34
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
34 changes: 0 additions & 34 deletions tests/e2e/lib/dpa_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,40 +389,6 @@ func GetSecretRef(credSecretRef string) string {
}
}

// // Parses a template file with the provided data and returns contents as byte array
// func parseTemplate(templateFile string, data interface{}) ([]byte, error) {
// // Parse the template file
// var tmpl *template.Template
// tmpl, err := template.ParseFiles(templateFile)
// if err != nil {
// return nil, err
// }

// // Create a temporary file to be able to write parsed data
// tempYamlFile, err := os.CreateTemp("templates/", "temp*.yaml")
// if err != nil {
// return nil, err
// }

// // Write data object values to temporary file
// err = tmpl.Execute(tempYamlFile, data)
// if err != nil {
// return nil, err
// }

// // Read the temporary file as byte array
// parsedData, err := ioutil.ReadFile(tempYamlFile.Name())
// if err != nil {
// return nil, err
// }

// // Close and clean up temp resources
// tempYamlFile.Close()
// defer os.Remove(tempYamlFile.Name())

// return parsedData, nil
// }

// Create DPA Custom Resource Definition from yaml
func (v *DpaCustomResource) CreateDpaFromYaml(yamlTemplatePath string, data interface{}) error {
// Define var for holding DPA type
Expand Down
11 changes: 0 additions & 11 deletions tests/e2e/lib/kube_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,6 @@ func serverVersion() (*version.Info, error) {
return clientset.Discovery().ServerVersion()
}

// func ReadFile(path string) ([]byte, error) {
// // pass in aws credentials by cli flag
// // from cli: -cloud=<"filepath">
// // go run main.go -cloud="/Users/emilymcmullan/.aws/credentials"
// // cloud := flag.String("cloud", "", "file path for aws credentials")
// // flag.Parse()
// // save passed in cred file as []byteq
// file, err := ioutil.ReadFile(path)
// return file, err
// }

func CreateCredentialsSecret(data []byte, namespace string, credSecretRef string) error {
clientset, err := setUpClient()
if err != nil {
Expand Down

0 comments on commit 5c8dc34

Please sign in to comment.