Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): fix dependabot alerts #1231

Merged
merged 10 commits into from
Oct 14, 2024
2 changes: 1 addition & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/graphql-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Follow the steps below to add `github.com/newrelic/newrelic-client-go` as a depe
```
module example.com/yourmodule

go 1.21
go 1.22

require (
github.com/newrelic/newrelic-client-go/v2 v2.0.1
Expand Down Expand Up @@ -131,7 +131,7 @@ Keep in mind that when you submit your pull request, you'll need to sign the CLA

### Requirements

- Go 1.21+
- Go 1.22+
- GNU Make
- git

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 github.com/newrelic/newrelic-client-go/v2

go 1.21
go 1.22

require (
github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxC
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4=
github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
Expand Down
25 changes: 5 additions & 20 deletions pkg/entities/entity_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestIntegrationSearchEntities(t *testing.T) {
client := newIntegrationTestClient(t)

params := EntitySearchQueryBuilder{
Name: "Dummy App",
Name: testhelpers.IntegrationTestApplicationEntityNameNew,
}

actual, err := client.GetEntitySearch(
Expand All @@ -33,21 +33,6 @@ func TestIntegrationSearchEntities(t *testing.T) {

require.NoError(t, err)
require.Greater(t, len(actual.Results.Entities), 0)

params = EntitySearchQueryBuilder{
Name: "WebPortal",
}

actual, err = client.GetEntitySearch(
EntitySearchOptions{},
"",
params,
[]EntitySearchSortCriteria{},
[]SortCriterionWithDirection{},
)

require.NoError(t, err)
require.Greater(t, len(actual.Results.Entities), 0)
}

func TestIntegrationSearchEntitiesByQuery(t *testing.T) {
Expand Down Expand Up @@ -161,7 +146,7 @@ func TestIntegrationGetEntity(t *testing.T) {
assert.Equal(t, 3806526, actual.AccountID)
assert.Equal(t, "APM", actual.Domain)
assert.Equal(t, EntityType("APM_APPLICATION_ENTITY"), actual.EntityType)
assert.Equal(t, testhelpers.IntegrationTestApplicationEntityGUIDNew, actual.GUID)
assert.Equal(t, testhelpers.IntegrationTestApplicationEntityGUIDNew, string(actual.GUID))
assert.Equal(t, "Dummy App Pro Max", actual.Name)
assert.Equal(t, "https://one.newrelic.com/redirect/entity/"+string(testhelpers.IntegrationTestApplicationEntityGUIDNew), actual.Permalink)
assert.Equal(t, true, actual.Reporting)
Expand Down Expand Up @@ -264,7 +249,7 @@ func TestIntegrationGetEntity_MobileEntity(t *testing.T) {

func TestIntegrationGetEntity_SyntheticsEntity(t *testing.T) {
t.Parallel()
syntheticsEntityMonitorGUID := "MzgwNjUyNnxTWU5USHxNT05JVE9SfGFmZmM0MTRiLTVhNmMtNGI5NS1iMzYwLThhNmQ2ZTkzOTM3Yw"
syntheticsEntityMonitorGUID := "MzgwNjUyNnxTWU5USHxNT05JVE9SfDVjNDg1NDFiLTg5MzQtNDkzYy1hNTVkLTNjMTgzZWNkN2ZlMg"
client := newIntegrationTestClient(t)

result, err := client.GetEntity(common.EntityGUID(syntheticsEntityMonitorGUID))
Expand All @@ -282,10 +267,10 @@ func TestIntegrationGetEntity_SyntheticsEntity(t *testing.T) {
entity := (*result).(*SyntheticMonitorEntity)
require.NotNil(t, entity)

deviceOrientation := FindTagByKey(entity.Tags, "deviceOrientation")
devices := FindTagByKey(entity.Tags, "devices")
runtimeType := FindTagByKey(entity.Tags, "runtimeType")
runtimeTypeVersion := FindTagByKey(entity.Tags, "runtimeTypeVersion")
require.Greater(t, len(deviceOrientation), 0)
require.Greater(t, len(devices), 0)
require.Greater(t, len(runtimeType), 0)
require.Greater(t, len(runtimeTypeVersion), 0)
}
Expand Down
Loading
Loading