Skip to content

Commit

Permalink
Fix missing entry in go.sum
Browse files Browse the repository at this point in the history
1. Fix util unit tests applicable for Windows
  • Loading branch information
KlwntSingh committed Mar 1, 2024
1 parent 96bf7b4 commit bf4d78a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
8 changes: 2 additions & 6 deletions internal/aws/containerinsight/utils_windows_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@
package containerinsight

import (
"os"
"testing"

"github.com/stretchr/testify/assert"
)

func TestHostProcessContainer(t *testing.T) {
os.Setenv(RunInContainer, "True")
t.Setenv(RunInContainer, "True")
assert.Equal(t, IsWindowsHostProcessContainer(), false)

os.Setenv(RunAsHostProcessContainer, "True")
t.Setenv(RunAsHostProcessContainer, "True")
assert.Equal(t, IsWindowsHostProcessContainer(), true)

os.Unsetenv(RunInContainer)
os.Unsetenv(RunAsHostProcessContainer)
}
5 changes: 4 additions & 1 deletion internal/aws/k8s/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ go 1.20

require (
github.com/aws/aws-sdk-go v1.47.10
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0
github.com/stretchr/testify v1.8.4
go.uber.org/zap v1.26.0
k8s.io/api v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0
)

require (
Expand Down Expand Up @@ -37,6 +37,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
Expand All @@ -45,6 +46,8 @@ require (
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions internal/aws/k8s/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion receiver/kubeletstatsreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ require (
)

require (
cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down Expand Up @@ -67,6 +66,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mostynb/go-grpc-compression v1.2.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand Down Expand Up @@ -124,6 +124,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sco

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet => ../../internal/kubelet

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight => ./../../internal/aws/containerinsight

// openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD
replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37

Expand Down
3 changes: 2 additions & 1 deletion receiver/kubeletstatsreceiver/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf4d78a

Please sign in to comment.