From 4cf31669686abfc58b14afddad321cae5ceb01f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 08:47:32 -0700 Subject: [PATCH 1/6] build(deps): bump slackapi/slack-github-action from 2.1.0 to 2.1.1 (#785) Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 2.1.0 to 2.1.1. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](https://github.com/slackapi/slack-github-action/compare/v2.1.0...v2.1.1) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-version: 2.1.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/nightly_smoke_tests.yml | 2 +- .github/workflows/release-notify-slack.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c027c1073..b9a804ac6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,7 @@ jobs: steps: - name: Notify Slack - uses: slackapi/slack-github-action@v2.1.0 + uses: slackapi/slack-github-action@v2.1.1 with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/nightly_smoke_tests.yml b/.github/workflows/nightly_smoke_tests.yml index c0d8aaede..d619ffa76 100644 --- a/.github/workflows/nightly_smoke_tests.yml +++ b/.github/workflows/nightly_smoke_tests.yml @@ -38,7 +38,7 @@ jobs: - name: Notify Slack if: (success() || failure()) && github.repository == 'linode/linodego' - uses: slackapi/slack-github-action@v2.1.0 + uses: slackapi/slack-github-action@v2.1.1 with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index 57aecc0a4..b82ee8f5e 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack - Main Message - uses: slackapi/slack-github-action@v2.1.0 + uses: slackapi/slack-github-action@v2.1.1 with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} From a02034928a0bb600a2e67a48d87f8882d3f3557b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 11:51:09 -0400 Subject: [PATCH 2/6] build(deps): bump golang.org/x/text from 0.26.0 to 0.27.0 (#783) * build(deps): bump golang.org/x/text from 0.26.0 to 0.27.0 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.26.0 to 0.27.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.26.0...v0.27.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-version: 0.27.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * make tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen --- go.mod | 2 +- go.sum | 4 ++-- go.work.sum | 3 ++- k8s/go.mod | 2 +- k8s/go.sum | 8 ++++---- test/go.mod | 2 +- test/go.sum | 8 ++++---- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index f1977b637..e2eef9b58 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/jarcoal/httpmock v1.4.0 golang.org/x/net v0.41.0 golang.org/x/oauth2 v0.30.0 - golang.org/x/text v0.26.0 + golang.org/x/text v0.27.0 gopkg.in/ini.v1 v1.66.6 ) diff --git a/go.sum b/go.sum index 601ceabc0..ffa75b969 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= -golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= -golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go.work.sum b/go.work.sum index 745094973..6d815e489 100644 --- a/go.work.sum +++ b/go.work.sum @@ -83,6 +83,7 @@ golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= @@ -96,7 +97,7 @@ golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= diff --git a/k8s/go.mod b/k8s/go.mod index a45d1eebe..9c5b2ab4e 100644 --- a/k8s/go.mod +++ b/k8s/go.mod @@ -33,7 +33,7 @@ require ( golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/term v0.32.0 // indirect - golang.org/x/text v0.26.0 // indirect + golang.org/x/text v0.27.0 // indirect golang.org/x/time v0.6.0 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/k8s/go.sum b/k8s/go.sum index 3cf9bc47d..ced5f5db0 100644 --- a/k8s/go.sum +++ b/k8s/go.sum @@ -107,16 +107,16 @@ golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= -golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/test/go.mod b/test/go.mod index a79c764b8..bbe5900fb 100644 --- a/test/go.mod +++ b/test/go.mod @@ -39,7 +39,7 @@ require ( github.com/stretchr/objx v0.5.2 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/term v0.32.0 // indirect - golang.org/x/text v0.26.0 // indirect + golang.org/x/text v0.27.0 // indirect golang.org/x/time v0.6.0 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/test/go.sum b/test/go.sum index b12587c2d..a4d2bb33f 100644 --- a/test/go.sum +++ b/test/go.sum @@ -116,16 +116,16 @@ golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= -golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 7800bdf86a0d2c9382b558e8cb0d9a89eedc06a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:53:06 -0400 Subject: [PATCH 3/6] build(deps): bump golang.org/x/net from 0.41.0 to 0.42.0 (#784) * build(deps): bump golang.org/x/net from 0.41.0 to 0.42.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.41.0 to 0.42.0. - [Commits](https://github.com/golang/net/compare/v0.41.0...v0.42.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.42.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * make tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen --- go.mod | 2 +- go.sum | 4 ++-- go.work.sum | 4 +++- k8s/go.mod | 6 +++--- k8s/go.sum | 12 ++++++------ test/go.mod | 6 +++--- test/go.sum | 12 ++++++------ 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index e2eef9b58..95a3e3c76 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/google/go-cmp v0.7.0 github.com/google/go-querystring v1.1.0 github.com/jarcoal/httpmock v1.4.0 - golang.org/x/net v0.41.0 + golang.org/x/net v0.42.0 golang.org/x/oauth2 v0.30.0 golang.org/x/text v0.27.0 gopkg.in/ini.v1 v1.66.6 diff --git a/go.sum b/go.sum index ffa75b969..3395b9274 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= -golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= diff --git a/go.work.sum b/go.work.sum index 6d815e489..c6f5e4414 100644 --- a/go.work.sum +++ b/go.work.sum @@ -59,6 +59,7 @@ golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZv golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= +golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= @@ -87,6 +88,7 @@ golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= @@ -94,10 +96,10 @@ golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFK golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= -golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= diff --git a/k8s/go.mod b/k8s/go.mod index 9c5b2ab4e..8f15f1830 100644 --- a/k8s/go.mod +++ b/k8s/go.mod @@ -29,10 +29,10 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/net v0.41.0 // indirect + golang.org/x/net v0.42.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/term v0.32.0 // indirect + golang.org/x/sys v0.34.0 // indirect + golang.org/x/term v0.33.0 // indirect golang.org/x/text v0.27.0 // indirect golang.org/x/time v0.6.0 // indirect google.golang.org/protobuf v1.33.0 // indirect diff --git a/k8s/go.sum b/k8s/go.sum index ced5f5db0..619e0e4ad 100644 --- a/k8s/go.sum +++ b/k8s/go.sum @@ -91,8 +91,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= -golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -101,10 +101,10 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= +golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= diff --git a/test/go.mod b/test/go.mod index bbe5900fb..e2674e5ed 100644 --- a/test/go.mod +++ b/test/go.mod @@ -8,7 +8,7 @@ require ( github.com/linode/linodego/k8s v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.10.0 golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 - golang.org/x/net v0.41.0 + golang.org/x/net v0.42.0 golang.org/x/oauth2 v0.30.0 k8s.io/client-go v0.29.4 ) @@ -37,8 +37,8 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/term v0.32.0 // indirect + golang.org/x/sys v0.34.0 // indirect + golang.org/x/term v0.33.0 // indirect golang.org/x/text v0.27.0 // indirect golang.org/x/time v0.6.0 // indirect google.golang.org/protobuf v1.33.0 // indirect diff --git a/test/go.sum b/test/go.sum index a4d2bb33f..507c09110 100644 --- a/test/go.sum +++ b/test/go.sum @@ -100,8 +100,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= -golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -110,10 +110,10 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= +golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= From d05c8f42f0c23c7549af2f5291e64784719b6127 Mon Sep 17 00:00:00 2001 From: Erik Zilber Date: Tue, 22 Jul 2025 11:15:45 -0400 Subject: [PATCH 4/6] Removed go.work.sum (#787) --- go.work.sum | 108 ---------------------------------------------------- 1 file changed, 108 deletions(-) delete mode 100644 go.work.sum diff --git a/go.work.sum b/go.work.sum deleted file mode 100644 index c6f5e4414..000000000 --- a/go.work.sum +++ /dev/null @@ -1,108 +0,0 @@ -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/go-resty/resty/v2 v2.16.2/go.mod h1:0fHAoK7JoBy/Ch36N8VFeMsK7xQOHhvWaC3iOktwmIU= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= -golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= -golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= -golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= -golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= -golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY= -golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= -golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= -golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= From 2f5a5d25a989c595727a06472a6b41c19b187eb0 Mon Sep 17 00:00:00 2001 From: Ye Chen <127243817+yec-akamai@users.noreply.github.com> Date: Mon, 28 Jul 2025 10:40:30 -0400 Subject: [PATCH 5/6] Fix lint fmt issue (#789) * fmt * add golines --- .golangci.yml | 4 + monitor_services_create_token.go | 6 +- nodebalancer_config_nodes.go | 8 +- nodebalancer_configs.go | 14 ++- object_storage_bucket_certs.go | 12 +- object_storage_buckets.go | 6 +- object_storage_object.go | 18 ++- request_helpers_test.go | 6 +- test/integration/account_oauth_client_test.go | 9 +- test/integration/images_test.go | 5 +- test/integration/instance_firewalls_test.go | 6 +- test/integration/instances_test.go | 25 +++- test/integration/integration_suite_test.go | 3 +- test/integration/lke_clusters_acl_test.go | 3 +- test/integration/lke_node_pools_test.go | 15 ++- .../monitor_metrics_definitions_test.go | 6 +- test/integration/mysql_db_config_test.go | 83 ++++++++++--- test/integration/network_ips_test.go | 3 +- test/integration/network_reserved_ips_test.go | 10 +- .../nodebalancer_config_nodes_test.go | 5 +- test/integration/nodebalancer_configs_test.go | 29 +++-- test/integration/nodebalancers_test.go | 19 ++- test/integration/object_storage_keys_test.go | 15 ++- test/integration/object_storage_quota_test.go | 3 +- test/integration/placement_group_test.go | 3 +- test/integration/postgres_db_config_test.go | 12 +- .../profile_security_question_test.go | 7 +- test/unit/account_promo_credits_test.go | 6 +- test/unit/account_test.go | 18 ++- test/unit/client_test.go | 3 +- test/unit/domain_test.go | 1 - test/unit/images_test.go | 4 +- test/unit/instance_test.go | 1 - test/unit/lke_node_pools_test.go | 3 +- test/unit/mysql_test.go | 57 ++++++--- test/unit/nodebalancer_configs_test.go | 3 +- test/unit/nodebalancers_test.go | 3 +- test/unit/object_storage_test.go | 3 +- test/unit/postgres_test.go | 112 +++++++++++++----- test/unit/profile_devices_test.go | 12 +- test/unit/profile_security_questions_test.go | 3 +- test/unit/profile_tfa_test.go | 3 +- test/unit/support_test.go | 12 +- test/unit/util_test.go | 3 +- waitfor.go | 8 +- 45 files changed, 433 insertions(+), 157 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 3ac122752..28e5abb8a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -73,11 +73,15 @@ linters: - builtin$ - examples$ formatters: + settings: + golines: + max-len: 160 enable: - gci - gofmt - gofumpt - goimports + - golines exclusions: generated: lax paths: diff --git a/monitor_services_create_token.go b/monitor_services_create_token.go index cb5ca12c4..a5cb47ae9 100644 --- a/monitor_services_create_token.go +++ b/monitor_services_create_token.go @@ -16,7 +16,11 @@ type MonitorTokenCreateOptions struct { } // CreateMonitorServiceTokenForServiceType to create token for a given serviceType -func (c *Client) CreateMonitorServiceTokenForServiceType(ctx context.Context, serviceType string, opts MonitorTokenCreateOptions) (*MonitorServiceToken, error) { +func (c *Client) CreateMonitorServiceTokenForServiceType( + ctx context.Context, + serviceType string, + opts MonitorTokenCreateOptions, +) (*MonitorServiceToken, error) { e := formatAPIPath("monitor/services/%s/token", serviceType) return doPOSTRequest[MonitorServiceToken](ctx, c, e, opts) } diff --git a/nodebalancer_config_nodes.go b/nodebalancer_config_nodes.go index dcffb9e45..6516ba717 100644 --- a/nodebalancer_config_nodes.go +++ b/nodebalancer_config_nodes.go @@ -90,7 +90,13 @@ func (c *Client) CreateNodeBalancerNode(ctx context.Context, nodebalancerID int, } // UpdateNodeBalancerNode updates the NodeBalancerNode with the specified id -func (c *Client) UpdateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int, opts NodeBalancerNodeUpdateOptions) (*NodeBalancerNode, error) { +func (c *Client) UpdateNodeBalancerNode( + ctx context.Context, + nodebalancerID int, + configID int, + nodeID int, + opts NodeBalancerNodeUpdateOptions, +) (*NodeBalancerNode, error) { e := formatAPIPath("nodebalancers/%d/configs/%d/nodes/%d", nodebalancerID, configID, nodeID) return doPUTRequest[NodeBalancerNode](ctx, c, e, opts) } diff --git a/nodebalancer_configs.go b/nodebalancer_configs.go index eb5f2fc61..2c532837b 100644 --- a/nodebalancer_configs.go +++ b/nodebalancer_configs.go @@ -264,7 +264,12 @@ func (c *Client) CreateNodeBalancerConfig(ctx context.Context, nodebalancerID in } // UpdateNodeBalancerConfig updates the NodeBalancerConfig with the specified id -func (c *Client) UpdateNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int, opts NodeBalancerConfigUpdateOptions) (*NodeBalancerConfig, error) { +func (c *Client) UpdateNodeBalancerConfig( + ctx context.Context, + nodebalancerID int, + configID int, + opts NodeBalancerConfigUpdateOptions, +) (*NodeBalancerConfig, error) { e := formatAPIPath("nodebalancers/%d/configs/%d", nodebalancerID, configID) return doPUTRequest[NodeBalancerConfig](ctx, c, e, opts) } @@ -276,7 +281,12 @@ func (c *Client) DeleteNodeBalancerConfig(ctx context.Context, nodebalancerID in } // RebuildNodeBalancerConfig updates the NodeBalancer with the specified id -func (c *Client) RebuildNodeBalancerConfig(ctx context.Context, nodeBalancerID int, configID int, opts NodeBalancerConfigRebuildOptions) (*NodeBalancerConfig, error) { +func (c *Client) RebuildNodeBalancerConfig( + ctx context.Context, + nodeBalancerID int, + configID int, + opts NodeBalancerConfigRebuildOptions, +) (*NodeBalancerConfig, error) { e := formatAPIPath("nodebalancers/%d/configs/%d/rebuild", nodeBalancerID, configID) return doPOSTRequest[NodeBalancerConfig](ctx, c, e, opts) } diff --git a/object_storage_bucket_certs.go b/object_storage_bucket_certs.go index 244aa1544..6597e40f5 100644 --- a/object_storage_bucket_certs.go +++ b/object_storage_bucket_certs.go @@ -20,7 +20,11 @@ type ObjectStorageBucketCertUploadOptions struct { // UploadObjectStorageBucketCert uploads a TLS/SSL Cert to be used with an Object Storage Bucket. // Deprecated: Please use UploadObjectStorageBucketCertV2 for all new implementations. -func (c *Client) UploadObjectStorageBucketCert(ctx context.Context, clusterOrRegionID, bucket string, opts ObjectStorageBucketCertUploadOptions) (*ObjectStorageBucketCert, error) { +func (c *Client) UploadObjectStorageBucketCert( + ctx context.Context, + clusterOrRegionID, bucket string, + opts ObjectStorageBucketCertUploadOptions, +) (*ObjectStorageBucketCert, error) { e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket) return doPOSTRequest[ObjectStorageBucketCert](ctx, c, e, opts) } @@ -33,7 +37,11 @@ func (c *Client) GetObjectStorageBucketCert(ctx context.Context, clusterOrRegion } // UploadObjectStorageBucketCert uploads a TLS/SSL Cert to be used with an Object Storage Bucket. -func (c *Client) UploadObjectStorageBucketCertV2(ctx context.Context, clusterOrRegionID, bucket string, opts ObjectStorageBucketCertUploadOptions) (*ObjectStorageBucketCertV2, error) { +func (c *Client) UploadObjectStorageBucketCertV2( + ctx context.Context, + clusterOrRegionID, bucket string, + opts ObjectStorageBucketCertUploadOptions, +) (*ObjectStorageBucketCertV2, error) { e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket) return doPOSTRequest[ObjectStorageBucketCertV2](ctx, c, e, opts) } diff --git a/object_storage_buckets.go b/object_storage_buckets.go index d520408ba..8755f3ade 100644 --- a/object_storage_buckets.go +++ b/object_storage_buckets.go @@ -172,7 +172,11 @@ func (c *Client) DeleteObjectStorageBucket(ctx context.Context, clusterOrRegionI } // Lists the contents of the specified ObjectStorageBucket -func (c *Client) ListObjectStorageBucketContents(ctx context.Context, clusterOrRegionID, label string, params *ObjectStorageBucketListContentsParams) (*ObjectStorageBucketContent, error) { +func (c *Client) ListObjectStorageBucketContents( + ctx context.Context, + clusterOrRegionID, label string, + params *ObjectStorageBucketListContentsParams, +) (*ObjectStorageBucketContent, error) { basePath := formatAPIPath("object-storage/buckets/%s/%s/object-list", clusterOrRegionID, label) queryString := "" diff --git a/object_storage_object.go b/object_storage_object.go index 61fd93e14..2e9cf8890 100644 --- a/object_storage_object.go +++ b/object_storage_object.go @@ -33,7 +33,11 @@ type ObjectStorageObjectACLConfigUpdateOptions struct { ACL string `json:"acl"` } -func (c *Client) CreateObjectStorageObjectURL(ctx context.Context, objectID, label string, opts ObjectStorageObjectURLCreateOptions) (*ObjectStorageObjectURL, error) { +func (c *Client) CreateObjectStorageObjectURL( + ctx context.Context, + objectID, label string, + opts ObjectStorageObjectURLCreateOptions, +) (*ObjectStorageObjectURL, error) { e := formatAPIPath("object-storage/buckets/%s/%s/object-url", objectID, label) return doPOSTRequest[ObjectStorageObjectURL](ctx, c, e, opts) } @@ -45,7 +49,11 @@ func (c *Client) GetObjectStorageObjectACLConfig(ctx context.Context, objectID, } // Deprecated: use UpdateObjectStorageObjectACLConfigV2 for new implementations -func (c *Client) UpdateObjectStorageObjectACLConfig(ctx context.Context, objectID, label string, opts ObjectStorageObjectACLConfigUpdateOptions) (*ObjectStorageObjectACLConfig, error) { +func (c *Client) UpdateObjectStorageObjectACLConfig( + ctx context.Context, + objectID, label string, + opts ObjectStorageObjectACLConfigUpdateOptions, +) (*ObjectStorageObjectACLConfig, error) { e := formatAPIPath("object-storage/buckets/%s/%s/object-acl", objectID, label) return doPUTRequest[ObjectStorageObjectACLConfig](ctx, c, e, opts) } @@ -55,7 +63,11 @@ func (c *Client) GetObjectStorageObjectACLConfigV2(ctx context.Context, objectID return doGETRequest[ObjectStorageObjectACLConfigV2](ctx, c, e) } -func (c *Client) UpdateObjectStorageObjectACLConfigV2(ctx context.Context, objectID, label string, opts ObjectStorageObjectACLConfigUpdateOptions) (*ObjectStorageObjectACLConfigV2, error) { +func (c *Client) UpdateObjectStorageObjectACLConfigV2( + ctx context.Context, + objectID, label string, + opts ObjectStorageObjectACLConfigUpdateOptions, +) (*ObjectStorageObjectACLConfigV2, error) { e := formatAPIPath("object-storage/buckets/%s/%s/object-acl", objectID, label) return doPUTRequest[ObjectStorageObjectACLConfigV2](ctx, c, e, opts) } diff --git a/request_helpers_test.go b/request_helpers_test.go index bed2e7403..ce4bf80b5 100644 --- a/request_helpers_test.go +++ b/request_helpers_test.go @@ -9,12 +9,10 @@ import ( "strconv" "testing" - "github.com/stretchr/testify/require" - - "github.com/linode/linodego/internal/testutil" - "github.com/google/go-cmp/cmp" "github.com/jarcoal/httpmock" + "github.com/linode/linodego/internal/testutil" + "github.com/stretchr/testify/require" ) type testResultNestedType struct { diff --git a/test/integration/account_oauth_client_test.go b/test/integration/account_oauth_client_test.go index 1aa951b09..538210584 100644 --- a/test/integration/account_oauth_client_test.go +++ b/test/integration/account_oauth_client_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" - "github.com/stretchr/testify/assert" - "github.com/linode/linodego" . "github.com/linode/linodego" + "github.com/stretchr/testify/assert" ) func TestOAuthClient_GetMissing(t *testing.T) { @@ -89,7 +88,11 @@ func TestOAuthClients_Reset(t *testing.T) { assert.NotEqual(t, oauthClient.Secret, oauthClientAfterReset.Secret, "Secret should have been reset") } -func setupOAuthClient(t *testing.T, createOpts linodego.OAuthClientCreateOptions, fixturesYaml string) (*linodego.Client, *linodego.OAuthClient, func(), error) { +func setupOAuthClient( + t *testing.T, + createOpts linodego.OAuthClientCreateOptions, + fixturesYaml string, +) (*linodego.Client, *linodego.OAuthClient, func(), error) { t.Helper() client, fixtureTeardown := createTestClient(t, fixturesYaml) oauthClient, err := client.CreateOAuthClient(context.Background(), createOpts) diff --git a/test/integration/images_test.go b/test/integration/images_test.go index 572fdd3d5..8abb13c75 100644 --- a/test/integration/images_test.go +++ b/test/integration/images_test.go @@ -6,11 +6,10 @@ import ( "slices" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/dnaeon/go-vcr/recorder" . "github.com/linode/linodego" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // testImageBytes is a minimal Gzipped image. diff --git a/test/integration/instance_firewalls_test.go b/test/integration/instance_firewalls_test.go index c3746213c..ff8728670 100644 --- a/test/integration/instance_firewalls_test.go +++ b/test/integration/instance_firewalls_test.go @@ -27,7 +27,11 @@ func TestInstanceFirewalls_List(t *testing.T) { } } -func setupInstanceFirewall(t *testing.T, firewallModifiers []firewallModifier, fixturesYaml string) (*linodego.Client, *linodego.Instance, *linodego.Firewall, error) { +func setupInstanceFirewall( + t *testing.T, + firewallModifiers []firewallModifier, + fixturesYaml string, +) (*linodego.Client, *linodego.Instance, *linodego.Firewall, error) { t.Helper() client, firewall, firewallTeardown, err := setupFirewall(t, firewallModifiers, fixturesYaml) diff --git a/test/integration/instances_test.go b/test/integration/instances_test.go index b12d1270c..490bb0afa 100644 --- a/test/integration/instances_test.go +++ b/test/integration/instances_test.go @@ -353,9 +353,14 @@ func TestInstance_Disks_List(t *testing.T) { } func TestInstance_Disks_List_WithEncryption(t *testing.T) { - client, instance, teardown, err := setupInstance(t, "fixtures/TestInstance_Disks_List_WithEncryption", true, func(c *linodego.Client, ico *linodego.InstanceCreateOptions) { - ico.Region = getRegionsWithCaps(t, c, []string{"Disk Encryption"})[0] - }) + client, instance, teardown, err := setupInstance( + t, + "fixtures/TestInstance_Disks_List_WithEncryption", + true, + func(c *linodego.Client, ico *linodego.InstanceCreateOptions) { + ico.Region = getRegionsWithCaps(t, c, []string{"Disk Encryption"})[0] + }, + ) defer teardown() if err != nil { t.Error(err) @@ -941,7 +946,12 @@ func createInstance(t *testing.T, client *linodego.Client, enableCloudFirewall b return client.CreateInstance(context.Background(), createOpts) } -func setupInstance(t *testing.T, fixturesYaml string, EnableCloudFirewall bool, modifiers ...instanceModifier) (*linodego.Client, *linodego.Instance, func(), error) { +func setupInstance( + t *testing.T, + fixturesYaml string, + EnableCloudFirewall bool, + modifiers ...instanceModifier, +) (*linodego.Client, *linodego.Instance, func(), error) { if t != nil { t.Helper() } @@ -1008,7 +1018,12 @@ func createInstanceWithoutDisks( return instance, config, teardown, err } -func setupInstanceWithoutDisks(t *testing.T, fixturesYaml string, enableCloudFirewall bool, modifiers ...instanceModifier) (*linodego.Client, *linodego.Instance, *linodego.InstanceConfig, func(), error) { +func setupInstanceWithoutDisks( + t *testing.T, + fixturesYaml string, + enableCloudFirewall bool, + modifiers ...instanceModifier, +) (*linodego.Client, *linodego.Instance, *linodego.InstanceConfig, func(), error) { t.Helper() client, fixtureTeardown := createTestClient(t, fixturesYaml) instance, config, instanceTeardown, err := createInstanceWithoutDisks(t, client, enableCloudFirewall, modifiers...) diff --git a/test/integration/integration_suite_test.go b/test/integration/integration_suite_test.go index 2bad132e3..04dc16710 100644 --- a/test/integration/integration_suite_test.go +++ b/test/integration/integration_suite_test.go @@ -13,11 +13,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/dnaeon/go-vcr/cassette" "github.com/dnaeon/go-vcr/recorder" "github.com/linode/linodego" + "github.com/stretchr/testify/require" "golang.org/x/oauth2" "k8s.io/client-go/transport" ) diff --git a/test/integration/lke_clusters_acl_test.go b/test/integration/lke_clusters_acl_test.go index e31f903b0..56cc254fd 100644 --- a/test/integration/lke_clusters_acl_test.go +++ b/test/integration/lke_clusters_acl_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" + "github.com/linode/linodego" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/linode/linodego" ) func TestLKECluster_withACL(t *testing.T) { diff --git a/test/integration/lke_node_pools_test.go b/test/integration/lke_node_pools_test.go index d792f2677..659dc9bc2 100644 --- a/test/integration/lke_node_pools_test.go +++ b/test/integration/lke_node_pools_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" - k8scondition "github.com/linode/linodego/k8s/pkg/condition" - "github.com/google/go-cmp/cmp" "github.com/linode/linodego" + k8scondition "github.com/linode/linodego/k8s/pkg/condition" ) var testLKENodePoolCreateOpts = linodego.LKENodePoolCreateOptions{ @@ -288,7 +287,11 @@ func TestLKENodePool_CreateWithLabelsAndTaints(t *testing.T) { } } -func setupLKENodePool(t *testing.T, fixturesYaml string, nodePoolCreateOpts *linodego.LKENodePoolCreateOptions) (*linodego.Client, *linodego.LKECluster, *linodego.LKENodePool, func(), error) { +func setupLKENodePool( + t *testing.T, + fixturesYaml string, + nodePoolCreateOpts *linodego.LKENodePoolCreateOptions, +) (*linodego.Client, *linodego.LKECluster, *linodego.LKENodePool, func(), error) { t.Helper() var fixtureTeardown func() client, lkeCluster, fixtureTeardown, err := setupLKECluster(t, []clusterModifier{func(createOpts *linodego.LKEClusterCreateOptions) { @@ -359,7 +362,11 @@ func TestLKEEnterpriseNodePoolK8sUpgrade_Update(t *testing.T) { } } -func setupLKEEnterpriseNodePool(t *testing.T, fixturesYaml string, nodePoolCreateOpts *linodego.LKENodePoolCreateOptions) (*linodego.Client, *linodego.LKECluster, *linodego.LKENodePool, func(), error) { +func setupLKEEnterpriseNodePool( + t *testing.T, + fixturesYaml string, + nodePoolCreateOpts *linodego.LKENodePoolCreateOptions, +) (*linodego.Client, *linodego.LKECluster, *linodego.LKENodePool, func(), error) { t.Helper() var fixtureTeardown func() client, lkeCluster, fixtureTeardown, err := setupLKECluster(t, []clusterModifier{func(createOpts *linodego.LKEClusterCreateOptions) { diff --git a/test/integration/monitor_metrics_definitions_test.go b/test/integration/monitor_metrics_definitions_test.go index e517789b5..76893b447 100644 --- a/test/integration/monitor_metrics_definitions_test.go +++ b/test/integration/monitor_metrics_definitions_test.go @@ -23,7 +23,11 @@ func TestMonitorMetricDefinitions_Get_smoke(t *testing.T) { } // Get the metric-definitions by serviceType for the filter "is_alertable":false - monitorMetricDefinitionsClientListFilter, listErr := client.ListMonitorMetricsDefinitionByServiceType(context.Background(), "dbaas", linodego.NewListOptions(0, "{\"is_alertable\":false}")) + monitorMetricDefinitionsClientListFilter, listErr := client.ListMonitorMetricsDefinitionByServiceType( + context.Background(), + "dbaas", + linodego.NewListOptions(0, "{\"is_alertable\":false}"), + ) if listErr != nil { t.Errorf("Error listing monitor metrics:%s", listErr) } diff --git a/test/integration/mysql_db_config_test.go b/test/integration/mysql_db_config_test.go index 3f2e7495d..9ad8f3052 100644 --- a/test/integration/mysql_db_config_test.go +++ b/test/integration/mysql_db_config_test.go @@ -27,8 +27,11 @@ func TestDatabaseMySQL_EngineConfig_Get(t *testing.T) { assert.IsType(t, bool(false), config.MySQL.ConnectTimeout.RequiresRestart) assert.Equal(t, "integer", config.MySQL.ConnectTimeout.Type) - assert.IsType(t, string("Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default."), - config.MySQL.DefaultTimeZone.Description) + assert.IsType( + t, + string("Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default."), + config.MySQL.DefaultTimeZone.Description, + ) assert.IsType(t, string("+03:00"), config.MySQL.DefaultTimeZone.Example) assert.IsType(t, int(100), config.MySQL.DefaultTimeZone.MaxLength) assert.IsType(t, int(2), config.MySQL.DefaultTimeZone.MinLength) @@ -50,82 +53,134 @@ func TestDatabaseMySQL_EngineConfig_Get(t *testing.T) { assert.IsType(t, bool(false), config.MySQL.InformationSchemaStatsExpiry.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InformationSchemaStatsExpiry.Type) - assert.IsType(t, string("Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25"), config.MySQL.InnoDBChangeBufferMaxSize.Description) + assert.IsType( + t, + string("Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25"), + config.MySQL.InnoDBChangeBufferMaxSize.Description, + ) assert.IsType(t, int(30), config.MySQL.InnoDBChangeBufferMaxSize.Example) assert.IsType(t, int(50), config.MySQL.InnoDBChangeBufferMaxSize.Maximum) assert.IsType(t, int(0), config.MySQL.InnoDBChangeBufferMaxSize.Minimum) assert.IsType(t, bool(false), config.MySQL.InnoDBChangeBufferMaxSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBChangeBufferMaxSize.Type) - assert.IsType(t, string("Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent"), config.MySQL.InnoDBFlushNeighbors.Description) + assert.IsType( + t, + string( + "Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent", + ), + config.MySQL.InnoDBFlushNeighbors.Description, + ) assert.IsType(t, int(0), config.MySQL.InnoDBFlushNeighbors.Example) assert.IsType(t, int(2), config.MySQL.InnoDBFlushNeighbors.Maximum) assert.IsType(t, int(0), config.MySQL.InnoDBFlushNeighbors.Minimum) assert.IsType(t, bool(false), config.MySQL.InnoDBFlushNeighbors.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBFlushNeighbors.Type) - assert.IsType(t, string("Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service."), config.MySQL.InnoDBFTMinTokenSize.Description) + assert.IsType( + t, + string("Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service."), + config.MySQL.InnoDBFTMinTokenSize.Description, + ) assert.IsType(t, int(3), config.MySQL.InnoDBFTMinTokenSize.Example) assert.IsType(t, int(16), config.MySQL.InnoDBFTMinTokenSize.Maximum) assert.IsType(t, int(0), config.MySQL.InnoDBFTMinTokenSize.Minimum) assert.IsType(t, bool(true), config.MySQL.InnoDBFTMinTokenSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBFTMinTokenSize.Type) - assert.IsType(t, string("This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables."), config.MySQL.InnoDBFTServerStopwordTable.Description) + assert.IsType( + t, + string("This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables."), + config.MySQL.InnoDBFTServerStopwordTable.Description, + ) assert.IsType(t, string("db_name/table_name"), config.MySQL.InnoDBFTServerStopwordTable.Example) assert.IsType(t, int(1024), config.MySQL.InnoDBFTServerStopwordTable.MaxLength) assert.IsType(t, string("^.+/.+$"), config.MySQL.InnoDBFTServerStopwordTable.Pattern) assert.IsType(t, bool(false), config.MySQL.InnoDBFTServerStopwordTable.RequiresRestart) assert.Equal(t, []string{"null", "string"}, config.MySQL.InnoDBFTServerStopwordTable.Type) - assert.IsType(t, string("The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120."), config.MySQL.InnoDBLockWaitTimeout.Description) + assert.IsType( + t, + string("The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120."), + config.MySQL.InnoDBLockWaitTimeout.Description, + ) assert.IsType(t, int(50), config.MySQL.InnoDBLockWaitTimeout.Example) assert.IsType(t, int(3600), config.MySQL.InnoDBLockWaitTimeout.Maximum) assert.IsType(t, int(1), config.MySQL.InnoDBLockWaitTimeout.Minimum) assert.IsType(t, bool(false), config.MySQL.InnoDBLockWaitTimeout.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBLockWaitTimeout.Type) - assert.IsType(t, string("The size in bytes of the buffer that InnoDB uses to write to the log files on disk."), config.MySQL.InnoDBLogBufferSize.Description) + assert.IsType( + t, + string("The size in bytes of the buffer that InnoDB uses to write to the log files on disk."), + config.MySQL.InnoDBLogBufferSize.Description, + ) assert.IsType(t, int(16777216), config.MySQL.InnoDBLogBufferSize.Example) assert.IsType(t, int(4294967295), config.MySQL.InnoDBLogBufferSize.Maximum) assert.IsType(t, int(1048576), config.MySQL.InnoDBLogBufferSize.Minimum) assert.IsType(t, bool(false), config.MySQL.InnoDBLogBufferSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBLogBufferSize.Type) - assert.IsType(t, string("The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables."), config.MySQL.InnoDBOnlineAlterLogMaxSize.Description) + assert.IsType( + t, + string("The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables."), + config.MySQL.InnoDBOnlineAlterLogMaxSize.Description, + ) assert.IsType(t, int(134217728), config.MySQL.InnoDBOnlineAlterLogMaxSize.Example) assert.IsType(t, int(1099511627776), config.MySQL.InnoDBOnlineAlterLogMaxSize.Maximum) assert.IsType(t, int(65536), config.MySQL.InnoDBOnlineAlterLogMaxSize.Minimum) assert.IsType(t, bool(false), config.MySQL.InnoDBOnlineAlterLogMaxSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBOnlineAlterLogMaxSize.Type) - assert.IsType(t, string("The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service."), config.MySQL.InnoDBReadIOThreads.Description) + assert.IsType( + t, + string("The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service."), + config.MySQL.InnoDBReadIOThreads.Description, + ) assert.IsType(t, int(10), config.MySQL.InnoDBReadIOThreads.Example) assert.IsType(t, int(64), config.MySQL.InnoDBReadIOThreads.Maximum) assert.IsType(t, int(1), config.MySQL.InnoDBReadIOThreads.Minimum) assert.IsType(t, bool(true), config.MySQL.InnoDBReadIOThreads.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBReadIOThreads.Type) - assert.IsType(t, string("When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service."), config.MySQL.InnoDBRollbackOnTimeout.Description) + assert.IsType( + t, + string( + "When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service.", + ), + config.MySQL.InnoDBRollbackOnTimeout.Description, + ) assert.IsType(t, bool(true), config.MySQL.InnoDBRollbackOnTimeout.Example) assert.IsType(t, bool(true), config.MySQL.InnoDBRollbackOnTimeout.RequiresRestart) assert.Equal(t, "boolean", config.MySQL.InnoDBRollbackOnTimeout.Type) - assert.IsType(t, string("Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit)"), config.MySQL.InnoDBThreadConcurrency.Description) + assert.IsType( + t, + string("Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit)"), + config.MySQL.InnoDBThreadConcurrency.Description, + ) assert.IsType(t, int(10), config.MySQL.InnoDBThreadConcurrency.Example) assert.IsType(t, int(1000), config.MySQL.InnoDBThreadConcurrency.Maximum) assert.IsType(t, int(0), config.MySQL.InnoDBThreadConcurrency.Minimum) assert.IsType(t, bool(false), config.MySQL.InnoDBThreadConcurrency.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBThreadConcurrency.Type) - assert.IsType(t, string("The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service."), config.MySQL.InnoDBWriteIOThreads.Description) + assert.IsType( + t, + string("The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service."), + config.MySQL.InnoDBWriteIOThreads.Description, + ) assert.IsType(t, int(10), config.MySQL.InnoDBWriteIOThreads.Example) assert.IsType(t, int(64), config.MySQL.InnoDBWriteIOThreads.Maximum) assert.IsType(t, int(1), config.MySQL.InnoDBWriteIOThreads.Minimum) assert.IsType(t, bool(true), config.MySQL.InnoDBWriteIOThreads.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBWriteIOThreads.Type) - assert.IsType(t, string("The number of seconds the server waits for activity on an interactive connection before closing it."), config.MySQL.InteractiveTimeout.Description) + assert.IsType( + t, + string("The number of seconds the server waits for activity on an interactive connection before closing it."), + config.MySQL.InteractiveTimeout.Description, + ) assert.IsType(t, int(3600), config.MySQL.InteractiveTimeout.Example) assert.IsType(t, int(604800), config.MySQL.InteractiveTimeout.Maximum) assert.IsType(t, int(30), config.MySQL.InteractiveTimeout.Minimum) diff --git a/test/integration/network_ips_test.go b/test/integration/network_ips_test.go index 545b4a492..fef3d2f4b 100644 --- a/test/integration/network_ips_test.go +++ b/test/integration/network_ips_test.go @@ -6,10 +6,9 @@ import ( "strings" "testing" - "github.com/stretchr/testify/require" - "github.com/linode/linodego" . "github.com/linode/linodego" + "github.com/stretchr/testify/require" ) func TestIPAddress_GetMissing(t *testing.T) { diff --git a/test/integration/network_reserved_ips_test.go b/test/integration/network_reserved_ips_test.go index c261a0ba3..9316fd8b8 100644 --- a/test/integration/network_reserved_ips_test.go +++ b/test/integration/network_reserved_ips_test.go @@ -82,7 +82,10 @@ func TestReservedIPAddresses_EndToEndTest(t *testing.T) { }) if resErr != nil { - t.Fatalf("Failed to reserve IP. This test expects the user to have 0 prior reservations and the ip_reservation_limit to be 2. Error from the API: %v", resErr) + t.Fatalf( + "Failed to reserve IP. This test expects the user to have 0 prior reservations and the ip_reservation_limit to be 2. Error from the API: %v", + resErr, + ) } t.Logf("Successfully reserved IP: %+v", resIP) @@ -206,7 +209,10 @@ func TestReservedIPAddresses_GetIPAddressVariants(t *testing.T) { }) if resErr != nil { - t.Fatalf("Failed to reserve IP. This test expects the user to have 0 prior reservations and the ip_reservation_limit to be 2. Error from the API: %v", resErr) + t.Fatalf( + "Failed to reserve IP. This test expects the user to have 0 prior reservations and the ip_reservation_limit to be 2. Error from the API: %v", + resErr, + ) } if resIP == nil { diff --git a/test/integration/nodebalancer_config_nodes_test.go b/test/integration/nodebalancer_config_nodes_test.go index 88ff33804..9948a285f 100644 --- a/test/integration/nodebalancer_config_nodes_test.go +++ b/test/integration/nodebalancer_config_nodes_test.go @@ -345,7 +345,10 @@ func TestNodeBalancerNode_Get_InVPC(t *testing.T) { } } -func setupNodeBalancerNode(t *testing.T, fixturesYaml string) (*linodego.Client, *linodego.NodeBalancer, *linodego.NodeBalancerConfig, *linodego.NodeBalancerNode, func(), error) { +func setupNodeBalancerNode( + t *testing.T, + fixturesYaml string, +) (*linodego.Client, *linodego.NodeBalancer, *linodego.NodeBalancerConfig, *linodego.NodeBalancerNode, func(), error) { t.Helper() var fixtureTeardown func() client, nodebalancer, config, fixtureTeardown, err := setupNodeBalancerConfig(t, fixturesYaml) diff --git a/test/integration/nodebalancer_configs_test.go b/test/integration/nodebalancer_configs_test.go index d262e6f46..6fc19203e 100644 --- a/test/integration/nodebalancer_configs_test.go +++ b/test/integration/nodebalancer_configs_test.go @@ -5,9 +5,8 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/require" - "github.com/linode/linodego" + "github.com/stretchr/testify/require" ) var TestNodeBalancerConfigCreateOpts = linodego.NodeBalancerConfigCreateOptions{ @@ -131,7 +130,10 @@ func TestNodeBalancerConfig_UDP(t *testing.T) { } func TestNodeBalancerConfig_Rebuild_InVPCWithInstance(t *testing.T) { - client, nodebalancer, subnet, instanceVPCIP, teardown, err := setupNodeBalancerWithVPCAndInstance(t, "fixtures/TestNodeBalancerConfig_Rebuild_InVPCWithInstance") + client, nodebalancer, subnet, instanceVPCIP, teardown, err := setupNodeBalancerWithVPCAndInstance( + t, + "fixtures/TestNodeBalancerConfig_Rebuild_InVPCWithInstance", + ) defer teardown() if err != nil { t.Error(err) @@ -220,7 +222,11 @@ func createNodeBalancerConfig( return config, teardown, err } -func setupNodeBalancerConfig(t *testing.T, fixturesYaml string, modifiers ...func(options *linodego.NodeBalancerConfigCreateOptions)) (*linodego.Client, *linodego.NodeBalancer, *linodego.NodeBalancerConfig, func(), error) { +func setupNodeBalancerConfig( + t *testing.T, + fixturesYaml string, + modifiers ...func(options *linodego.NodeBalancerConfigCreateOptions), +) (*linodego.Client, *linodego.NodeBalancer, *linodego.NodeBalancerConfig, func(), error) { t.Helper() var fixtureTeardown func() client, nodebalancer, fixtureTeardown, err := setupNodeBalancer(t, fixturesYaml, nil) @@ -240,12 +246,19 @@ func setupNodeBalancerConfig(t *testing.T, fixturesYaml string, modifiers ...fun return client, nodebalancer, config, teardown, err } -func setupNodeBalancerWithVPCAndInstance(t *testing.T, fixturesYaml string) (*linodego.Client, *linodego.NodeBalancer, *linodego.VPCSubnet, string, func(), error) { +func setupNodeBalancerWithVPCAndInstance( + t *testing.T, + fixturesYaml string, +) (*linodego.Client, *linodego.NodeBalancer, *linodego.VPCSubnet, string, func(), error) { t.Helper() var fixtureTeardown func() - client, nodebalancer, _, subnet, fixtureTeardown, err := setupNodeBalancerWithVPC(t, fixturesYaml, func(client *linodego.Client, options *linodego.VPCCreateOptions) { - options.Region = getRegionsWithCaps(t, client, []string{"Linodes", "VPCs"})[1] - }) + client, nodebalancer, _, subnet, fixtureTeardown, err := setupNodeBalancerWithVPC( + t, + fixturesYaml, + func(client *linodego.Client, options *linodego.VPCCreateOptions) { + options.Region = getRegionsWithCaps(t, client, []string{"Linodes", "VPCs"})[1] + }, + ) if err != nil { t.Fatalf("Error creating nodebalancer, got error %v", err) } diff --git a/test/integration/nodebalancers_test.go b/test/integration/nodebalancers_test.go index bccb9e88b..003c86370 100644 --- a/test/integration/nodebalancers_test.go +++ b/test/integration/nodebalancers_test.go @@ -5,9 +5,8 @@ import ( "strings" "testing" - "github.com/stretchr/testify/require" - "github.com/linode/linodego" + "github.com/stretchr/testify/require" ) var ( @@ -33,9 +32,13 @@ func TestNodeBalancer_Create_create_smoke(t *testing.T) { } func TestNodeBalancer_Create_Type(t *testing.T) { - _, nodebalancer, teardown, err := setupNodeBalancer(t, "fixtures/TestNodeBalancer_Create_Type", []nbModifier{func(createOpts *linodego.NodeBalancerCreateOptions) { - createOpts.Type = linodego.NBTypeCommon - }}) + _, nodebalancer, teardown, err := setupNodeBalancer( + t, + "fixtures/TestNodeBalancer_Create_Type", + []nbModifier{func(createOpts *linodego.NodeBalancerCreateOptions) { + createOpts.Type = linodego.NBTypeCommon + }}, + ) defer teardown() if err != nil { @@ -170,7 +173,11 @@ func setupNodeBalancer(t *testing.T, fixturesYaml string, nbModifiers []nbModifi return client, nodebalancer, teardown, err } -func setupNodeBalancerWithVPC(t *testing.T, fixturesYaml string, vpcModifier ...vpcModifier) (*linodego.Client, *linodego.NodeBalancer, *linodego.VPC, *linodego.VPCSubnet, func(), error) { +func setupNodeBalancerWithVPC( + t *testing.T, + fixturesYaml string, + vpcModifier ...vpcModifier, +) (*linodego.Client, *linodego.NodeBalancer, *linodego.VPC, *linodego.VPCSubnet, func(), error) { t.Helper() var fixtureTeardown func() client, fixtureTeardown := createTestClient(t, fixturesYaml) diff --git a/test/integration/object_storage_keys_test.go b/test/integration/object_storage_keys_test.go index 876311abd..069272683 100644 --- a/test/integration/object_storage_keys_test.go +++ b/test/integration/object_storage_keys_test.go @@ -7,7 +7,6 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/linode/linodego" . "github.com/linode/linodego" ) @@ -136,7 +135,11 @@ func TestObjectStorageKeys_Limited(t *testing.T) { t.Error(err) } if !objectStorageKey.Limited || !cmp.Equal(objectStorageKey.BucketAccess, createOpts.BucketAccess) { - t.Errorf("objectStorageKey returned (%v) does not match objectStorageKey creation request (%v)", *objectStorageKey.BucketAccess, *createOpts.BucketAccess) + t.Errorf( + "objectStorageKey returned (%v) does not match objectStorageKey creation request (%v)", + *objectStorageKey.BucketAccess, + *createOpts.BucketAccess, + ) } } @@ -233,7 +236,13 @@ func TestObjectStorageKeys_Regional_Limited(t *testing.T) { } } -func setupObjectStorageKey(t *testing.T, createOpts ObjectStorageKeyCreateOptions, fixturesYaml string, client *Client, teardown func()) (*Client, *ObjectStorageKey, func(), error) { +func setupObjectStorageKey( + t *testing.T, + createOpts ObjectStorageKeyCreateOptions, + fixturesYaml string, + client *Client, + teardown func(), +) (*Client, *ObjectStorageKey, func(), error) { t.Helper() if (client == nil) != (teardown == nil) { diff --git a/test/integration/object_storage_quota_test.go b/test/integration/object_storage_quota_test.go index 109a198cc..03f7a6002 100644 --- a/test/integration/object_storage_quota_test.go +++ b/test/integration/object_storage_quota_test.go @@ -4,9 +4,8 @@ import ( "context" "testing" - "github.com/stretchr/testify/assert" - "github.com/linode/linodego" + "github.com/stretchr/testify/assert" ) func TestObjectStorageQuotas_Get(t *testing.T) { diff --git a/test/integration/placement_group_test.go b/test/integration/placement_group_test.go index d55559761..a6f4c7e42 100644 --- a/test/integration/placement_group_test.go +++ b/test/integration/placement_group_test.go @@ -6,9 +6,8 @@ import ( "reflect" "testing" - "github.com/stretchr/testify/require" - "github.com/linode/linodego" + "github.com/stretchr/testify/require" ) type placementGroupModifier func(*linodego.Client, *linodego.PlacementGroupCreateOptions) diff --git a/test/integration/postgres_db_config_test.go b/test/integration/postgres_db_config_test.go index c1be0867d..8643c9971 100644 --- a/test/integration/postgres_db_config_test.go +++ b/test/integration/postgres_db_config_test.go @@ -231,7 +231,11 @@ func TestDatabasePostgres_EngineConfig_Get(t *testing.T) { assert.IsType(t, false, config.PG.PGStatMonitorPGSMMaxBuckets.RequiresRestart) assert.IsType(t, "integer", config.PG.PGStatMonitorPGSMMaxBuckets.Type) - assert.IsType(t, "Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default value is top.", config.PG.PGStatStatementsTrack.Description) + assert.IsType( + t, + "Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default value is top.", + config.PG.PGStatStatementsTrack.Description, + ) assert.IsType(t, []string{"all", "top", "none"}, config.PG.PGStatStatementsTrack.Enum) assert.IsType(t, false, config.PG.PGStatStatementsTrack.RequiresRestart) assert.IsType(t, "string", config.PG.PGStatStatementsTrack.Type) @@ -250,7 +254,11 @@ func TestDatabasePostgres_EngineConfig_Get(t *testing.T) { assert.IsType(t, false, config.PG.Timezone.RequiresRestart) assert.IsType(t, "string", config.PG.Timezone.Type) - assert.IsType(t, "Specifies the number of bytes reserved to track the currently executing command for each active session.", config.PG.TrackActivityQuerySize.Description) + assert.IsType( + t, + "Specifies the number of bytes reserved to track the currently executing command for each active session.", + config.PG.TrackActivityQuerySize.Description, + ) assert.IsType(t, int(1024), config.PG.TrackActivityQuerySize.Example) assert.IsType(t, int(10240), config.PG.TrackActivityQuerySize.Maximum) assert.IsType(t, int(1024), config.PG.TrackActivityQuerySize.Minimum) diff --git a/test/integration/profile_security_question_test.go b/test/integration/profile_security_question_test.go index 30520eca3..ba61e07ec 100644 --- a/test/integration/profile_security_question_test.go +++ b/test/integration/profile_security_question_test.go @@ -18,5 +18,10 @@ func TestSecurityQuestions_List(t *testing.T) { require.NotEmpty(t, questions.SecurityQuestions, "Expected to see security questions returned") - require.Equal(t, "What was the name of your first pet?", questions.SecurityQuestions[0].Question, "Expected question 'What was the name of your first pet?'") + require.Equal( + t, + "What was the name of your first pet?", + questions.SecurityQuestions[0].Question, + "Expected question 'What was the name of your first pet?'", + ) } diff --git a/test/unit/account_promo_credits_test.go b/test/unit/account_promo_credits_test.go index 04b77e492..bed7a8cf7 100644 --- a/test/unit/account_promo_credits_test.go +++ b/test/unit/account_promo_credits_test.go @@ -29,7 +29,11 @@ func TestAccountPromoCredits_Add(t *testing.T) { assert.Equal(t, "10.00", promoCode.CreditMonthlyCap) assert.Equal(t, "50.00", promoCode.CreditRemaining) - assert.Equal(t, "Receive up to $10 off your services every month for 6 months! Unused credits will expire once this promotion period ends.", promoCode.Description) + assert.Equal( + t, + "Receive up to $10 off your services every month for 6 months! Unused credits will expire once this promotion period ends.", + promoCode.Description, + ) assert.Equal(t, "https://linode.com/10_a_month_promotion.svg", promoCode.ImageURL) assert.Equal(t, "all", promoCode.ServiceType) assert.Equal(t, "$10 off your Linode a month!", promoCode.Summary) diff --git a/test/unit/account_test.go b/test/unit/account_test.go index c6c7d0c35..d3521b855 100644 --- a/test/unit/account_test.go +++ b/test/unit/account_test.go @@ -39,13 +39,21 @@ func TestAccount_Get(t *testing.T) { } assert.Equal(t, "E1AF5EEC-526F-487D-B317EBEB34C87D71", accountInfo.EUUID) assert.Equal(t, "akamai", accountInfo.BillingSource) - assert.Equal(t, []string{"Linodes", "NodeBalancers", "Block Storage", "Object Storage", "Placement Groups", "Block Storage Encryption"}, accountInfo.Capabilities) + assert.Equal( + t, + []string{"Linodes", "NodeBalancers", "Block Storage", "Object Storage", "Placement Groups", "Block Storage Encryption"}, + accountInfo.Capabilities, + ) assert.Equal(t, "Philadelphia", accountInfo.City) assert.Equal(t, "PA", accountInfo.State) assert.Equal(t, "10.00", accountInfo.ActivePromotions[0].CreditMonthlyCap) assert.Equal(t, "50.00", accountInfo.ActivePromotions[0].CreditRemaining) - assert.Equal(t, "Receive up to $10 off your services every month for 6 months! Unused credits will expire once this promotion period ends.", accountInfo.ActivePromotions[0].Description) + assert.Equal( + t, + "Receive up to $10 off your services every month for 6 months! Unused credits will expire once this promotion period ends.", + accountInfo.ActivePromotions[0].Description, + ) assert.Equal(t, "https://linode.com/10_a_month_promotion.svg", accountInfo.ActivePromotions[0].ImageURL) assert.Equal(t, "all", accountInfo.ActivePromotions[0].ServiceType) assert.Equal(t, "$10 off your Linode a month!", accountInfo.ActivePromotions[0].Summary) @@ -88,7 +96,11 @@ func TestAccount_Update(t *testing.T) { } assert.Equal(t, "E1AF5EEC-526F-487D-B317EBEB34C87D71", accountInfo.EUUID) assert.Equal(t, "akamai", accountInfo.BillingSource) - assert.Equal(t, []string{"Linodes", "NodeBalancers", "Block Storage", "Object Storage", "Placement Groups", "Block Storage Encryption"}, accountInfo.Capabilities) + assert.Equal( + t, + []string{"Linodes", "NodeBalancers", "Block Storage", "Object Storage", "Placement Groups", "Block Storage Encryption"}, + accountInfo.Capabilities, + ) assert.Equal(t, "Cambridge", accountInfo.City) assert.Equal(t, "MA", accountInfo.State) diff --git a/test/unit/client_test.go b/test/unit/client_test.go index e4c3be91d..bf8ffd14e 100644 --- a/test/unit/client_test.go +++ b/test/unit/client_test.go @@ -5,10 +5,9 @@ import ( "net/http" "testing" - "golang.org/x/net/http2" - "github.com/jarcoal/httpmock" "github.com/linode/linodego" + "golang.org/x/net/http2" ) func TestClient_NGINXRetry(t *testing.T) { diff --git a/test/unit/domain_test.go b/test/unit/domain_test.go index f39f9dac8..28fa89f3f 100644 --- a/test/unit/domain_test.go +++ b/test/unit/domain_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/jarcoal/httpmock" - "github.com/linode/linodego" "github.com/stretchr/testify/assert" ) diff --git a/test/unit/images_test.go b/test/unit/images_test.go index 0eac4b45a..a79baa948 100644 --- a/test/unit/images_test.go +++ b/test/unit/images_test.go @@ -8,10 +8,8 @@ import ( "time" "github.com/jarcoal/httpmock" - - "github.com/stretchr/testify/assert" - "github.com/linode/linodego" + "github.com/stretchr/testify/assert" ) func TestImage_List(t *testing.T) { diff --git a/test/unit/instance_test.go b/test/unit/instance_test.go index acadd5180..ff512eeed 100644 --- a/test/unit/instance_test.go +++ b/test/unit/instance_test.go @@ -8,7 +8,6 @@ import ( "github.com/jarcoal/httpmock" "github.com/linode/linodego" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/test/unit/lke_node_pools_test.go b/test/unit/lke_node_pools_test.go index 48db8c31d..7b4fcb129 100644 --- a/test/unit/lke_node_pools_test.go +++ b/test/unit/lke_node_pools_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" + "github.com/jarcoal/httpmock" "github.com/linode/linodego" "github.com/stretchr/testify/assert" - - "github.com/jarcoal/httpmock" ) func Ptr[T any](v T) *T { diff --git a/test/unit/mysql_test.go b/test/unit/mysql_test.go index 996d84ac9..94b99a2f2 100644 --- a/test/unit/mysql_test.go +++ b/test/unit/mysql_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/jarcoal/httpmock" - "github.com/linode/linodego" "github.com/stretchr/testify/assert" ) @@ -364,8 +363,11 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.InnoDBChangeBufferMaxSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBChangeBufferMaxSize.Type) - assert.Equal(t, "Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent", - config.MySQL.InnoDBFlushNeighbors.Description) + assert.Equal( + t, + "Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent", + config.MySQL.InnoDBFlushNeighbors.Description, + ) assert.Equal(t, 0, config.MySQL.InnoDBFlushNeighbors.Example) assert.Equal(t, 2, config.MySQL.InnoDBFlushNeighbors.Maximum) assert.Equal(t, 0, config.MySQL.InnoDBFlushNeighbors.Minimum) @@ -412,16 +414,22 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.InnoDBOnlineAlterLogMaxSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBOnlineAlterLogMaxSize.Type) - assert.Equal(t, "The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.", - config.MySQL.InnoDBReadIOThreads.Description) + assert.Equal( + t, + "The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.", + config.MySQL.InnoDBReadIOThreads.Description, + ) assert.Equal(t, 10, config.MySQL.InnoDBReadIOThreads.Example) assert.Equal(t, 64, config.MySQL.InnoDBReadIOThreads.Maximum) assert.Equal(t, 1, config.MySQL.InnoDBReadIOThreads.Minimum) assert.True(t, config.MySQL.InnoDBReadIOThreads.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBReadIOThreads.Type) - assert.Equal(t, "When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service.", - config.MySQL.InnoDBRollbackOnTimeout.Description) + assert.Equal( + t, + "When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service.", + config.MySQL.InnoDBRollbackOnTimeout.Description, + ) assert.Equal(t, true, config.MySQL.InnoDBRollbackOnTimeout.Example) assert.True(t, config.MySQL.InnoDBRollbackOnTimeout.RequiresRestart) assert.Equal(t, "boolean", config.MySQL.InnoDBRollbackOnTimeout.Type) @@ -434,8 +442,11 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.InnoDBThreadConcurrency.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBThreadConcurrency.Type) - assert.Equal(t, "The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.", - config.MySQL.InnoDBWriteIOThreads.Description) + assert.Equal( + t, + "The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.", + config.MySQL.InnoDBWriteIOThreads.Description, + ) assert.Equal(t, 10, config.MySQL.InnoDBWriteIOThreads.Example) assert.Equal(t, 64, config.MySQL.InnoDBWriteIOThreads.Maximum) assert.Equal(t, 1, config.MySQL.InnoDBWriteIOThreads.Minimum) @@ -473,8 +484,11 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.MaxHeapTableSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.MaxHeapTableSize.Type) - assert.Equal(t, "Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service.", - config.MySQL.NetBufferLength.Description) + assert.Equal( + t, + "Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service.", + config.MySQL.NetBufferLength.Description, + ) assert.Equal(t, 16384, config.MySQL.NetBufferLength.Example) assert.Equal(t, 1048576, config.MySQL.NetBufferLength.Maximum) assert.Equal(t, 1024, config.MySQL.NetBufferLength.Minimum) @@ -505,16 +519,22 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.SortBufferSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.SortBufferSize.Type) - assert.Equal(t, "Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Akamai default SQL mode (strict, SQL standard compliant) will be assigned.", - config.MySQL.SQLMode.Description) + assert.Equal( + t, + "Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Akamai default SQL mode (strict, SQL standard compliant) will be assigned.", + config.MySQL.SQLMode.Description, + ) assert.Equal(t, "ANSI,TRADITIONAL", config.MySQL.SQLMode.Example) assert.Equal(t, 1024, config.MySQL.SQLMode.MaxLength) assert.Equal(t, "^[A-Z_]*(,[A-Z_]+)*$", config.MySQL.SQLMode.Pattern) assert.False(t, config.MySQL.SQLMode.RequiresRestart) assert.Equal(t, "string", config.MySQL.SQLMode.Type) - assert.Equal(t, "Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them.", - config.MySQL.SQLRequirePrimaryKey.Description) + assert.Equal( + t, + "Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them.", + config.MySQL.SQLRequirePrimaryKey.Description, + ) assert.Equal(t, true, config.MySQL.SQLRequirePrimaryKey.Example) assert.False(t, config.MySQL.SQLRequirePrimaryKey.RequiresRestart) assert.Equal(t, "boolean", config.MySQL.SQLRequirePrimaryKey.Type) @@ -535,8 +555,11 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.WaitTimeout.RequiresRestart) assert.Equal(t, "integer", config.MySQL.WaitTimeout.Type) - assert.Equal(t, "The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.", - config.BinlogRetentionPeriod.Description) + assert.Equal( + t, + "The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.", + config.BinlogRetentionPeriod.Description, + ) assert.Equal(t, 600, config.BinlogRetentionPeriod.Example) assert.Equal(t, 86400, config.BinlogRetentionPeriod.Maximum) assert.Equal(t, 600, config.BinlogRetentionPeriod.Minimum) diff --git a/test/unit/nodebalancer_configs_test.go b/test/unit/nodebalancer_configs_test.go index c247d1a73..cfddeab05 100644 --- a/test/unit/nodebalancer_configs_test.go +++ b/test/unit/nodebalancer_configs_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" - "github.com/stretchr/testify/require" - "github.com/linode/linodego" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestNodeBalancerConfigs_UDP(t *testing.T) { diff --git a/test/unit/nodebalancers_test.go b/test/unit/nodebalancers_test.go index 50072adce..b4e7cd273 100644 --- a/test/unit/nodebalancers_test.go +++ b/test/unit/nodebalancers_test.go @@ -5,10 +5,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/linode/linodego" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestNodeBalancers_UDP(t *testing.T) { diff --git a/test/unit/object_storage_test.go b/test/unit/object_storage_test.go index 61ee86161..be025e4bd 100644 --- a/test/unit/object_storage_test.go +++ b/test/unit/object_storage_test.go @@ -4,9 +4,8 @@ import ( "context" "testing" - "github.com/stretchr/testify/assert" - "github.com/jarcoal/httpmock" + "github.com/stretchr/testify/assert" ) func TestObjectStorage_Cancel(t *testing.T) { diff --git a/test/unit/postgres_test.go b/test/unit/postgres_test.go index a3356e7e1..8ab37ff45 100644 --- a/test/unit/postgres_test.go +++ b/test/unit/postgres_test.go @@ -387,43 +387,61 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.AutovacuumAnalyzeScaleFactor.RequiresRestart) assert.Equal(t, "number", config.PG.AutovacuumAnalyzeScaleFactor.Type) - assert.Equal(t, "Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples.", - config.PG.AutovacuumAnalyzeThreshold.Description) + assert.Equal( + t, + "Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples.", + config.PG.AutovacuumAnalyzeThreshold.Description, + ) assert.Equal(t, int32(2147483647), config.PG.AutovacuumAnalyzeThreshold.Maximum) assert.Equal(t, int32(0), config.PG.AutovacuumAnalyzeThreshold.Minimum) assert.False(t, config.PG.AutovacuumAnalyzeThreshold.RequiresRestart) assert.Equal(t, "integer", config.PG.AutovacuumAnalyzeThreshold.Type) - assert.Equal(t, "Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start.", - config.PG.AutovacuumMaxWorkers.Description) + assert.Equal( + t, + "Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start.", + config.PG.AutovacuumMaxWorkers.Description, + ) assert.Equal(t, 20, config.PG.AutovacuumMaxWorkers.Maximum) assert.Equal(t, 1, config.PG.AutovacuumMaxWorkers.Minimum) assert.False(t, config.PG.AutovacuumMaxWorkers.RequiresRestart) assert.Equal(t, "integer", config.PG.AutovacuumMaxWorkers.Type) - assert.Equal(t, "Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds, and the default is one minute", - config.PG.AutovacuumNaptime.Description) + assert.Equal( + t, + "Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds, and the default is one minute", + config.PG.AutovacuumNaptime.Description, + ) assert.Equal(t, 86400, config.PG.AutovacuumNaptime.Maximum) assert.Equal(t, 1, config.PG.AutovacuumNaptime.Minimum) assert.False(t, config.PG.AutovacuumNaptime.RequiresRestart) assert.Equal(t, "integer", config.PG.AutovacuumNaptime.Type) - assert.Equal(t, "Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_delay value will be used. The default value is 20 milliseconds", - config.PG.AutovacuumVacuumCostDelay.Description) + assert.Equal( + t, + "Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_delay value will be used. The default value is 20 milliseconds", + config.PG.AutovacuumVacuumCostDelay.Description, + ) assert.Equal(t, 100, config.PG.AutovacuumVacuumCostDelay.Maximum) assert.Equal(t, -1, config.PG.AutovacuumVacuumCostDelay.Minimum) assert.False(t, config.PG.AutovacuumVacuumCostDelay.RequiresRestart) assert.Equal(t, "integer", config.PG.AutovacuumVacuumCostDelay.Type) - assert.Equal(t, "Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used.", - config.PG.AutovacuumVacuumCostLimit.Description) + assert.Equal( + t, + "Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used.", + config.PG.AutovacuumVacuumCostLimit.Description, + ) assert.Equal(t, 10000, config.PG.AutovacuumVacuumCostLimit.Maximum) assert.Equal(t, -1, config.PG.AutovacuumVacuumCostLimit.Minimum) assert.False(t, config.PG.AutovacuumVacuumCostLimit.RequiresRestart) assert.Equal(t, "integer", config.PG.AutovacuumVacuumCostLimit.Type) - assert.Equal(t, "Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size)", - config.PG.AutovacuumVacuumScaleFactor.Description) + assert.Equal( + t, + "Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size)", + config.PG.AutovacuumVacuumScaleFactor.Description, + ) assert.Equal(t, 1.0, config.PG.AutovacuumVacuumScaleFactor.Maximum) assert.Equal(t, 0.0, config.PG.AutovacuumVacuumScaleFactor.Minimum) assert.False(t, config.PG.AutovacuumVacuumScaleFactor.RequiresRestart) @@ -444,24 +462,33 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.BGWriterDelay.RequiresRestart) assert.Equal(t, "integer", config.PG.BGWriterDelay.Type) - assert.Equal(t, "Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback.", - config.PG.BGWriterFlushAfter.Description) + assert.Equal( + t, + "Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback.", + config.PG.BGWriterFlushAfter.Description, + ) assert.Equal(t, 512, config.PG.BGWriterFlushAfter.Example) assert.Equal(t, 2048, config.PG.BGWriterFlushAfter.Maximum) assert.Equal(t, 0, config.PG.BGWriterFlushAfter.Minimum) assert.False(t, config.PG.BGWriterFlushAfter.RequiresRestart) assert.Equal(t, "integer", config.PG.BGWriterFlushAfter.Type) - assert.Equal(t, "In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. Default is 100.", - config.PG.BGWriterLRUMaxPages.Description) + assert.Equal( + t, + "In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. Default is 100.", + config.PG.BGWriterLRUMaxPages.Description, + ) assert.Equal(t, 100, config.PG.BGWriterLRUMaxPages.Example) assert.Equal(t, 1073741823, config.PG.BGWriterLRUMaxPages.Maximum) assert.Equal(t, 0, config.PG.BGWriterLRUMaxPages.Minimum) assert.False(t, config.PG.BGWriterLRUMaxPages.RequiresRestart) assert.Equal(t, "integer", config.PG.BGWriterLRUMaxPages.Type) - assert.Equal(t, "The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0.", - config.PG.BGWriterLRUMultiplier.Description) + assert.Equal( + t, + "The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0.", + config.PG.BGWriterLRUMultiplier.Description, + ) assert.Equal(t, 2.0, config.PG.BGWriterLRUMultiplier.Example) assert.Equal(t, 10.0, config.PG.BGWriterLRUMultiplier.Maximum) assert.Equal(t, 0.0, config.PG.BGWriterLRUMultiplier.Minimum) @@ -545,8 +572,11 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.MaxReplicationSlots.RequiresRestart) assert.Equal(t, "integer", config.PG.MaxReplicationSlots.Type) - assert.Equal(t, "PostgreSQL maximum WAL size (MB) reserved for replication slots. Default is -1 (unlimited). wal_keep_size minimum WAL size setting takes precedence over this.", - config.PG.MaxSlotWALKeepSize.Description) + assert.Equal( + t, + "PostgreSQL maximum WAL size (MB) reserved for replication slots. Default is -1 (unlimited). wal_keep_size minimum WAL size setting takes precedence over this.", + config.PG.MaxSlotWALKeepSize.Description, + ) assert.Equal(t, int32(2147483647), config.PG.MaxSlotWALKeepSize.Maximum) assert.Equal(t, int32(-1), config.PG.MaxSlotWALKeepSize.Minimum) assert.False(t, config.PG.MaxSlotWALKeepSize.RequiresRestart) @@ -624,8 +654,11 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.PGStatMonitorPGSMMaxBuckets.RequiresRestart) assert.Equal(t, "integer", config.PG.PGStatMonitorPGSMMaxBuckets.Type) - assert.Equal(t, "Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default value is top.", - config.PG.PGStatStatementsTrack.Description) + assert.Equal( + t, + "Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default value is top.", + config.PG.PGStatStatementsTrack.Description, + ) assert.Equal(t, []string{"all", "top", "none"}, config.PG.PGStatStatementsTrack.Enum) assert.False(t, config.PG.PGStatStatementsTrack.RequiresRestart) assert.Equal(t, "string", config.PG.PGStatStatementsTrack.Type) @@ -667,15 +700,21 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.TrackFunctions.RequiresRestart) assert.Equal(t, "string", config.PG.TrackFunctions.Type) - assert.Equal(t, "Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms.", - config.PG.TrackIOTiming.Description) + assert.Equal( + t, + "Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms.", + config.PG.TrackIOTiming.Description, + ) assert.Equal(t, "off", config.PG.TrackIOTiming.Example) assert.Equal(t, []string{"off", "on"}, config.PG.TrackIOTiming.Enum) assert.False(t, config.PG.TrackIOTiming.RequiresRestart) assert.Equal(t, "string", config.PG.TrackIOTiming.Type) - assert.Equal(t, "Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout.", - config.PG.WALSenderTimeout.Description) + assert.Equal( + t, + "Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout.", + config.PG.WALSenderTimeout.Description, + ) assert.Equal(t, 60000, config.PG.WALSenderTimeout.Example) assert.False(t, config.PG.WALSenderTimeout.RequiresRestart) assert.Equal(t, "integer", config.PG.WALSenderTimeout.Type) @@ -688,8 +727,11 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.WALWriterDelay.RequiresRestart) assert.Equal(t, "integer", config.PG.WALWriterDelay.Type) - assert.Equal(t, "Enable the pg_stat_monitor extension. Enabling this extension will cause the cluster to be restarted.When this extension is enabled, pg_stat_statements results for utility commands are unreliable", - config.PGStatMonitorEnable.Description) + assert.Equal( + t, + "Enable the pg_stat_monitor extension. Enabling this extension will cause the cluster to be restarted.When this extension is enabled, pg_stat_statements results for utility commands are unreliable", + config.PGStatMonitorEnable.Description, + ) assert.True(t, config.PGStatMonitorEnable.RequiresRestart) assert.Equal(t, "boolean", config.PGStatMonitorEnable.Type) @@ -700,16 +742,22 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PGLookout.PGLookoutMaxFailoverReplicationTimeLag.RequiresRestart) assert.Equal(t, "integer", config.PGLookout.PGLookoutMaxFailoverReplicationTimeLag.Type) - assert.Equal(t, "Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.", - config.SharedBuffersPercentage.Description) + assert.Equal( + t, + "Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.", + config.SharedBuffersPercentage.Description, + ) assert.Equal(t, 41.5, config.SharedBuffersPercentage.Example) assert.Equal(t, 60.0, config.SharedBuffersPercentage.Maximum) assert.Equal(t, 20.0, config.SharedBuffersPercentage.Minimum) assert.False(t, config.SharedBuffersPercentage.RequiresRestart) assert.Equal(t, "number", config.SharedBuffersPercentage.Type) - assert.Equal(t, "Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).", - config.WorkMem.Description) + assert.Equal( + t, + "Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).", + config.WorkMem.Description, + ) assert.Equal(t, 4, config.WorkMem.Example) assert.Equal(t, 1024, config.WorkMem.Maximum) assert.Equal(t, 1, config.WorkMem.Minimum) diff --git a/test/unit/profile_devices_test.go b/test/unit/profile_devices_test.go index b58a480cd..a0affe084 100644 --- a/test/unit/profile_devices_test.go +++ b/test/unit/profile_devices_test.go @@ -23,7 +23,11 @@ func TestProfileDevices_Get(t *testing.T) { assert.Equal(t, 123, device.ID) assert.Equal(t, "203.0.113.1", device.LastRemoteAddr) - assert.Equal(t, "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36", device.UserAgent) + assert.Equal( + t, + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36", + device.UserAgent, + ) } func TestProfileDevices_List(t *testing.T) { @@ -44,7 +48,11 @@ func TestProfileDevices_List(t *testing.T) { assert.Equal(t, 123, device.ID) assert.Equal(t, "203.0.113.1", device.LastRemoteAddr) - assert.Equal(t, "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36", device.UserAgent) + assert.Equal( + t, + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36", + device.UserAgent, + ) } func TestProfileDevices_Delete(t *testing.T) { diff --git a/test/unit/profile_security_questions_test.go b/test/unit/profile_security_questions_test.go index 7735df24a..6231ecfa2 100644 --- a/test/unit/profile_security_questions_test.go +++ b/test/unit/profile_security_questions_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" - "github.com/stretchr/testify/assert" - "github.com/jarcoal/httpmock" "github.com/linode/linodego" + "github.com/stretchr/testify/assert" ) func TestSecurityQuestions_List(t *testing.T) { diff --git a/test/unit/profile_tfa_test.go b/test/unit/profile_tfa_test.go index 965491093..d819011d2 100644 --- a/test/unit/profile_tfa_test.go +++ b/test/unit/profile_tfa_test.go @@ -5,10 +5,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/jarcoal/httpmock" "github.com/linode/linodego" + "github.com/stretchr/testify/assert" ) func TestTwoFactor_CreateSecret_smoke(t *testing.T) { diff --git a/test/unit/support_test.go b/test/unit/support_test.go index 62a4bec74..4f03233c5 100644 --- a/test/unit/support_test.go +++ b/test/unit/support_test.go @@ -28,7 +28,11 @@ func TestSupportTicket_List(t *testing.T) { assert.Equal(t, []string{"screenshot.jpg", "screenshot.txt"}, ticket.Attachments) assert.Equal(t, false, ticket.Closeable) - assert.Equal(t, "I am having trouble setting the root password on my Linode. I tried following the instructions but something is not working. Can you please help me figure out how I can reset it?", ticket.Description) + assert.Equal( + t, + "I am having trouble setting the root password on my Linode. I tried following the instructions but something is not working. Can you please help me figure out how I can reset it?", + ticket.Description, + ) assert.Equal(t, 10400, ticket.Entity.ID) assert.Equal(t, "linode123456", ticket.Entity.Label) assert.Equal(t, "linode", ticket.Entity.Type) @@ -58,7 +62,11 @@ func TestSupportTicket_Get(t *testing.T) { assert.Equal(t, []string{"screenshot.jpg", "screenshot.txt"}, ticket.Attachments) assert.Equal(t, false, ticket.Closeable) - assert.Equal(t, "I am having trouble setting the root password on my Linode. I tried following the instructions but something is not working. Can you please help me figure out how I can reset it?", ticket.Description) + assert.Equal( + t, + "I am having trouble setting the root password on my Linode. I tried following the instructions but something is not working. Can you please help me figure out how I can reset it?", + ticket.Description, + ) assert.Equal(t, 10400, ticket.Entity.ID) assert.Equal(t, "linode123456", ticket.Entity.Label) assert.Equal(t, "linode", ticket.Entity.Type) diff --git a/test/unit/util_test.go b/test/unit/util_test.go index 5614b51e0..ae6b655f4 100644 --- a/test/unit/util_test.go +++ b/test/unit/util_test.go @@ -6,10 +6,9 @@ import ( "regexp" "testing" + "github.com/jarcoal/httpmock" "github.com/linode/linodego" "github.com/linode/linodego/internal/testutil" - - "github.com/jarcoal/httpmock" ) func mockRequestBodyValidate(t *testing.T, expected interface{}, response interface{}) httpmock.Responder { diff --git a/waitfor.go b/waitfor.go index bbb20ee4a..db8e04ae4 100644 --- a/waitfor.go +++ b/waitfor.go @@ -122,7 +122,13 @@ func (client Client) WaitForVolumeStatus(ctx context.Context, volumeID int, stat // WaitForSnapshotStatus waits for the Snapshot to reach the desired state // before returning. It will timeout with an error after timeoutSeconds. -func (client Client) WaitForSnapshotStatus(ctx context.Context, instanceID int, snapshotID int, status InstanceSnapshotStatus, timeoutSeconds int) (*InstanceSnapshot, error) { +func (client Client) WaitForSnapshotStatus( + ctx context.Context, + instanceID int, + snapshotID int, + status InstanceSnapshotStatus, + timeoutSeconds int, +) (*InstanceSnapshot, error) { ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second) defer cancel() From 703ce6283c82f0b2ee5395db4dae75cb8676754f Mon Sep 17 00:00:00 2001 From: Tarun Chinmai Sekar <70169773+tchinmai7@users.noreply.github.com> Date: Mon, 28 Jul 2025 10:27:35 -0700 Subject: [PATCH 6/6] Feat: add support for instanceFirewallUpdate (#788) Signed-off-by: Tarun Chinmai Sekar --- instance_firewalls.go | 10 +++ request_helpers.go | 89 ++++++++++++++++--- .../fixtures/instance_firewall_update.json | 16 ++++ test/unit/instance_firewall_test.go | 22 +++++ 4 files changed, 123 insertions(+), 14 deletions(-) create mode 100644 test/unit/fixtures/instance_firewall_update.json diff --git a/instance_firewalls.go b/instance_firewalls.go index 77838ca47..a25ce205a 100644 --- a/instance_firewalls.go +++ b/instance_firewalls.go @@ -8,3 +8,13 @@ import ( func (c *Client) ListInstanceFirewalls(ctx context.Context, linodeID int, opts *ListOptions) ([]Firewall, error) { return getPaginatedResults[Firewall](ctx, c, formatAPIPath("linode/instances/%d/firewalls", linodeID), opts) } + +type InstanceFirewallUpdateOptions struct { + FirewallIDs []int `json:"firewall_ids"` +} + +// UpdateInstanceFirewalls updates the Cloud Firewalls for a Linode instance +// Followup this call with `ListInstanceFirewalls` to verify the changes if necessary. +func (c *Client) UpdateInstanceFirewalls(ctx context.Context, linodeID int, opts InstanceFirewallUpdateOptions) ([]Firewall, error) { + return putPaginatedResults[Firewall, InstanceFirewallUpdateOptions](ctx, c, formatAPIPath("linode/instances/%d/firewalls", linodeID), nil, opts) +} diff --git a/request_helpers.go b/request_helpers.go index 73a419248..15adcaa01 100644 --- a/request_helpers.go +++ b/request_helpers.go @@ -17,17 +17,17 @@ type paginatedResponse[T any] struct { Data []T `json:"data"` } -// getPaginatedResults aggregates results from the given -// paginated endpoint using the provided ListOptions. +// handlePaginatedResults aggregates results from the given +// paginated endpoint using the provided ListOptions and HTTP method. // nolint:funlen -func getPaginatedResults[T any]( +func handlePaginatedResults[T any, O any]( ctx context.Context, client *Client, endpoint string, opts *ListOptions, + method string, + options ...O, ) ([]T, error) { - var resultType paginatedResponse[T] - result := make([]T, 0) if opts == nil { @@ -38,38 +38,76 @@ func getPaginatedResults[T any]( opts.PageOptions = &PageOptions{Page: 0} } - // Makes a request to a particular page and - // appends the response to the result + // Validate options + numOpts := len(options) + if numOpts > 1 { + return nil, fmt.Errorf("invalid number of options: expected 0 or 1, got %d", numOpts) + } + + // Prepare request body if options are provided + var reqBody string + + if numOpts > 0 && !isNil(options[0]) { + body, err := json.Marshal(options[0]) + if err != nil { + return nil, fmt.Errorf("failed to marshal request body: %w", err) + } + + reqBody = string(body) + } + + // Makes a request to a particular page and appends the response to the result handlePage := func(page int) error { + var resultType paginatedResponse[T] + // Override the page to be applied in applyListOptionsToRequest(...) opts.Page = page // This request object cannot be reused for each page request // because it can lead to possible data corruption - req := client.R(ctx).SetResult(resultType) + req := client.R(ctx).SetResult(&resultType) // Apply all user-provided list options to the request if err := applyListOptionsToRequest(opts, req); err != nil { return err } - res, err := coupleAPIErrors(req.Get(endpoint)) - if err != nil { - return err + // Set request body if provided + if reqBody != "" { + req.SetBody(reqBody) } - response := res.Result().(*paginatedResponse[T]) + var response *paginatedResponse[T] + // Execute the appropriate HTTP method + switch method { + case "GET": + res, err := coupleAPIErrors(req.Get(endpoint)) + if err != nil { + return err + } + + response = res.Result().(*paginatedResponse[T]) + case "PUT": + res, err := coupleAPIErrors(req.Put(endpoint)) + if err != nil { + return err + } + + response = res.Result().(*paginatedResponse[T]) + default: + return fmt.Errorf("unsupported HTTP method: %s", method) + } + // Update pagination metadata opts.Page = page opts.Pages = response.Pages opts.Results = response.Results - result = append(result, response.Data...) return nil } - // This helps simplify the logic below + // Determine starting page startingPage := 1 pageDefined := opts.Page > 0 @@ -98,6 +136,29 @@ func getPaginatedResults[T any]( return result, nil } +// getPaginatedResults aggregates results from the given +// paginated endpoint using the provided ListOptions. +func getPaginatedResults[T any]( + ctx context.Context, + client *Client, + endpoint string, + opts *ListOptions, +) ([]T, error) { + return handlePaginatedResults[T, any](ctx, client, endpoint, opts, "GET") +} + +// putPaginatedResults sends a PUT request and aggregates the results from the given +// paginated endpoint using the provided ListOptions. +func putPaginatedResults[T, O any]( + ctx context.Context, + client *Client, + endpoint string, + opts *ListOptions, + options ...O, +) ([]T, error) { + return handlePaginatedResults[T, O](ctx, client, endpoint, opts, "PUT", options...) +} + // doGETRequest runs a GET request using the given client and API endpoint, // and returns the result func doGETRequest[T any]( diff --git a/test/unit/fixtures/instance_firewall_update.json b/test/unit/fixtures/instance_firewall_update.json new file mode 100644 index 000000000..3a708613c --- /dev/null +++ b/test/unit/fixtures/instance_firewall_update.json @@ -0,0 +1,16 @@ +{ + "data": [ + { + "id": 789, + "label": "firewall-1", + "status": "enabled", + "rules": { + "inbound": [], + "outbound": [] + } + } + ], + "page": 1, + "pages": 1, + "results": 1 +} diff --git a/test/unit/instance_firewall_test.go b/test/unit/instance_firewall_test.go index 82881e43b..f558d883a 100644 --- a/test/unit/instance_firewall_test.go +++ b/test/unit/instance_firewall_test.go @@ -4,6 +4,7 @@ import ( "context" "testing" + "github.com/linode/linodego" "github.com/stretchr/testify/assert" ) @@ -27,3 +28,24 @@ func TestInstanceFirewalls_List(t *testing.T) { assert.Equal(t, 789, firewalls[1].ID) assert.Equal(t, "firewall-2", firewalls[1].Label) } + +func TestInstanceFirewalls_Update(t *testing.T) { + fixtureData, err := fixtures.GetFixture("instance_firewall_update") + assert.NoError(t, err) + + var base ClientBaseCase + base.SetUp(t) + defer base.TearDown(t) + + base.MockGet("linode/instances/123/firewalls", fixtureData) + base.MockPut("linode/instances/123/firewalls", fixtureData) + updateOpts := linodego.InstanceFirewallUpdateOptions{ + FirewallIDs: []int{789}, + } + + firewalls, err := base.Client.UpdateInstanceFirewalls(context.Background(), 123, updateOpts) + assert.NoError(t, err) + assert.NotNil(t, firewalls) + assert.Len(t, firewalls, 1) + assert.Equal(t, 789, firewalls[0].ID) +}