cyberark/secrets-provider-for-k8s

View on GitHub
e2e/rotations_utils.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function CopyFileIntoPod has 7 return statements (exceeds 4 allowed).
Open

func CopyFileIntoPod(client klient.Client, podName string, namespace string, containerName string, src string, dst string) error {
    // create client-go clientset
    clientset, err := kubernetes.NewForConfig(client.RESTConfig())
    if err != nil {
        return fmt.Errorf("unable to initialize K8s client: %v", err)
Severity: Major
Found in e2e/rotations_utils.go - About 45 mins to fix

    Function CopyFileIntoPod has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func CopyFileIntoPod(client klient.Client, podName string, namespace string, containerName string, src string, dst string) error {
    Severity: Minor
    Found in e2e/rotations_utils.go - About 45 mins to fix

      Function LoadPolicy has 5 return statements (exceeds 4 allowed).
      Open

      func LoadPolicy(client klient.Client, filename string) error {
          // create generated file from template
          fileName, src, err := GeneratePolicyFromTemplate(client, filename)
          if err != nil {
              return err
      Severity: Major
      Found in e2e/rotations_utils.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status