Skip to content

Commit

Permalink
Format, clean unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Baungard Hansen <[email protected]>
  • Loading branch information
jacobbaungard committed Dec 19, 2024
1 parent 4010d13 commit f0710ae
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions tests/pkg/utils/mco_grafana.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,15 @@ import (
"os"
"strings"

"gopkg.in/yaml.v2"
"k8s.io/klog"
)

var (

BearerToken string
optionsFile string

testOptions TestOptions
testOptionsContainer TestOptionsContainer
BearerToken string
optionsFile string

)

func GetGrafanaURL(opt TestOptions) string {
if optionsFile == "" {
optionsFile = os.Getenv("OPTIONS")
if optionsFile == "" {
optionsFile = "resources/options.yaml"
}
}

data, err := os.ReadFile(optionsFile)
if err != nil {
klog.Errorf("--options error: %v", err)
}

err = yaml.Unmarshal([]byte(data), &testOptionsContainer)
if err != nil {
klog.Errorf("--options error: %v", err)
}

testOptions = testOptionsContainer.Options

cloudProvider := strings.ToLower(os.Getenv("CLOUD_PROVIDER"))
substring1 := "rosa"
substring2 := "hcp"
Expand Down

0 comments on commit f0710ae

Please sign in to comment.