Skip to content

Commit

Permalink
go 1.21 (#861)
Browse files Browse the repository at this point in the history
* update golang
* use cnspec v8

Signed-off-by: Ivan Milchev <[email protected]>
Co-authored-by: Ivan Milchev <[email protected]>
  • Loading branch information
chris-rock and imilchev authored Sep 21, 2023
1 parent 5676da6 commit a620342
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
golang-version=1.19
golang-version=1.21
operator-sdk-version=v1.26.0
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,12 @@ prep/repos:
# workaround for now. Needs to be removed as we move to v9
cd cnquery && git fetch && git checkout v8
test -x cnspec || git clone https://github.com/mondoohq/cnspec.git
cd cnspec && git fetch && git checkout v8

prep/repos/update: prep/repos
# workaround for now. Needs to be removed as we move to v9
cd cnquery; git fetch; git checkout v8 && git pull; cd -;
cd cnspec; git checkout main && git pull; cd -;
cd cnspec; git checkout v8 && git pull; cd -;

prep/ci/protoc:
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTO_VERSION}/protoc-${PROTO_VERSION}-linux-x86_64.zip
Expand Down
10 changes: 0 additions & 10 deletions controllers/nodes/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ package nodes
import (
"crypto/sha256"
"fmt"
"math/rand"
"testing"
"time"

"github.com/stretchr/testify/assert"
"go.mondoo.com/mondoo-operator/api/v1alpha2"
Expand All @@ -31,7 +29,6 @@ const (
)

func TestCronJobName(t *testing.T) {
rand.Seed(time.Now().UnixNano())
prefix := "mondoo-client"
tests := []struct {
name string
Expand Down Expand Up @@ -66,14 +63,12 @@ func TestCronJobName(t *testing.T) {
}

func TestGarbageCollectCronJobName(t *testing.T) {
rand.Seed(time.Now().UnixNano())
prefix := "mondoo-client"

assert.Equal(t, fmt.Sprintf("%s%s", prefix, GarbageCollectCronJobNameBase), GarbageCollectCronJobName(prefix))
}

func TestConfigMapName(t *testing.T) {
rand.Seed(time.Now().UnixNano())
prefix := "mondoo-client"
tests := []struct {
name string
Expand Down Expand Up @@ -108,7 +103,6 @@ func TestConfigMapName(t *testing.T) {
}

func TestResources(t *testing.T) {
rand.Seed(time.Now().UnixNano())
tests := []struct {
name string
mondooauditconfig func() *v1alpha2.MondooAuditConfig
Expand Down Expand Up @@ -166,8 +160,6 @@ func TestResources(t *testing.T) {
}

func TestCronJob_PrivilegedOpenshift(t *testing.T) {
rand.Seed(time.Now().UnixNano())

testNode := &corev1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "test-node-name",
Expand All @@ -180,8 +172,6 @@ func TestCronJob_PrivilegedOpenshift(t *testing.T) {
}

func TestCronJob_Privileged(t *testing.T) {
rand.Seed(time.Now().UnixNano())

testNode := &corev1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "test-node-name",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.mondoo.com/mondoo-operator

go 1.19
go 1.21

require (
github.com/gobwas/glob v0.2.3
Expand Down

0 comments on commit a620342

Please sign in to comment.