Skip to content

Commit

Permalink
Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 (#53)
Browse files Browse the repository at this point in the history
* Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update utils_test.go

* .

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yunus Sandikci <[email protected]>
  • Loading branch information
dependabot[bot] and yunussandikci committed May 12, 2024
1 parent dbf453c commit 12468bb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion devops.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

export CONTROLLER_GEN_VERSION="v0.15.0"
export GOLANGCI_LINT_VERSION="v1.57.2"
export GOLANGCI_LINT_VERSION="v1.58.1"
export MOCKERY_GEN_VERSION="v2.42.3"
export GOFUMPT_VERSION="v0.6.0"
export TESTENV_VERSION="1.25.x!"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/go-echarts/go-echarts/v2 v2.3.3
github.com/go-logr/logr v1.4.1
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/client_golang v1.19.1
github.com/stretchr/testify v1.9.0
k8s.io/api v0.30.0
k8s.io/apimachinery v0.30.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
Expand Down
20 changes: 11 additions & 9 deletions pkg/common/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package common

import (
"math/rand"
"testing"
"time"

Expand Down Expand Up @@ -28,20 +29,21 @@ func TestResolveSchedule_Date(t *testing.T) {

func TestResolveSchedule_Duration(t *testing.T) {
// given
date := metav1.Time{Time: gofakeit.Date()}
duration := 60 * time.Minute
currentDate := metav1.Time{Time: gofakeit.Date()}
duration := time.Duration(rand.Int31n(100000)) * time.Second
expected := currentDate.Add(duration)

// when
schedule, scheduleErr := ResolveSchedule(date, duration.String())
schedule, scheduleErr := ResolveSchedule(currentDate, duration.String())

// then
assert.Nil(t, scheduleErr)
assert.Equal(t, date.Year(), schedule.Year())
assert.Equal(t, date.Month(), schedule.Month())
assert.Equal(t, date.Day(), schedule.Day())
assert.Equal(t, date.Hour(), schedule.Hour()-1)
assert.Equal(t, date.Minute(), schedule.Minute())
assert.Equal(t, date.Second(), schedule.Second())
assert.Equal(t, expected.Year(), schedule.Year())
assert.Equal(t, expected.Month(), schedule.Month())
assert.Equal(t, expected.Day(), schedule.Day())
assert.Equal(t, expected.Hour(), schedule.Hour())
assert.Equal(t, expected.Minute(), schedule.Minute())
assert.Equal(t, expected.Second(), schedule.Second())
}

func TestNewResourceInstance(t *testing.T) {
Expand Down

0 comments on commit 12468bb

Please sign in to comment.