Skip to content

Commit

Permalink
Merge pull request #28 from mguetta1/logger
Browse files Browse the repository at this point in the history
Add logger
  • Loading branch information
mguetta1 committed Sep 14, 2023
2 parents 44bf020 + 0b9d832 commit f9f701d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion e2e/metrics/metrics_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ func getHubFullName() string {
}

func GetMetricValue(metricName string) int {
utils.Log.Info("Waiting for 30 seconds...")
time.Sleep(30 * time.Second)
cmd := fmt.Sprintf("oc exec -n %s %s -- curl http://localhost:2112/metrics | grep %s", operator_namespace, hub_pod_name, metricName)
cmd := fmt.Sprintf("oc exec -n %s %s -- curl -s http://localhost:2112/metrics | grep %s", operator_namespace, hub_pod_name, metricName)
var outStr []string = strings.Split(runCmd(cmd), "\n")
metricValue := outStr[len(outStr)-1]
metricValue = utils.LastString(strings.Split(metricValue, " "))
Expand Down
2 changes: 2 additions & 0 deletions utils/pkg.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package utils

import (
"github.com/jortel/go-utils/logr"
"github.com/konveyor/tackle2-hub/binding"
"github.com/konveyor/tackle2-hub/test/api/client"
)
Expand All @@ -11,6 +12,7 @@ var (
Application binding.Application
Tracker binding.Tracker
Identity binding.Identity
Log = logr.WithName("test")
)

func init() {
Expand Down

0 comments on commit f9f701d

Please sign in to comment.