From 00277c17950f90e4315df84f7546109d556af513 Mon Sep 17 00:00:00 2001 From: Ivan Santos <106602251+ivan-santos-eq@users.noreply.github.com> Date: Mon, 17 Oct 2022 14:40:33 -0500 Subject: [PATCH 1/6] fix: change mongodb-boltdb-mock deleted repo ref to new SHA --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 948a89d..240a342 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/sirupsen/logrus v1.4.2 // indirect github.com/stretchr/testify v1.4.0 github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect - github.com/zaffka/mongodb-boltdb-mock v0.0.0-20180816124423-49954d88fa3e + github.com/zaffka/mongodb-boltdb-mock v0.0.0-20221014194232-b4bb03fbe3a0 ) go 1.13 diff --git a/go.sum b/go.sum index 047d278..b05afb2 100644 --- a/go.sum +++ b/go.sum @@ -15,7 +15,6 @@ github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -52,13 +51,12 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 h1:1b6PAtenNyhsmo/NKXVe34h7JEZKva1YB/ne7K7mqKM= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= -github.com/zaffka/mongodb-boltdb-mock v0.0.0-20180816124423-49954d88fa3e h1:SAWaLuuQkrnxHsFS9l0ZnnxCFeI9okwNk5hteWxrNNg= -github.com/zaffka/mongodb-boltdb-mock v0.0.0-20180816124423-49954d88fa3e/go.mod h1:GsDD1qsG+86MeeCG7ndi6Ei3iGthKL3wQ7PTFigDfNY= +github.com/zaffka/mongodb-boltdb-mock v0.0.0-20221014194232-b4bb03fbe3a0 h1:25CxwNe/bwECkbtsSKrh3XWF3lg59JTIjfwttIW6gyY= +github.com/zaffka/mongodb-boltdb-mock v0.0.0-20221014194232-b4bb03fbe3a0/go.mod h1:GsDD1qsG+86MeeCG7ndi6Ei3iGthKL3wQ7PTFigDfNY= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= From aaf2b9230aaf944c8b19a84405bdda1e95bf0a75 Mon Sep 17 00:00:00 2001 From: Chesley Brown Date: Tue, 18 Oct 2022 12:57:36 -0300 Subject: [PATCH 2/6] Remove use of travis --- .travis.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3433b40..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -env: - global: - - CC_TEST_REPORTER_ID=aa591e48dd3f08c8dd398d5dac90c4a4d4d32f0e359a932c035ea65a2b005efd - -language: go - -services: - - mongodb - -before_install: - - go get -t -v ./... - -before_script: - # Let code climate know that we are preparing to send a report - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build - -script: - # Run tests + generate coverage - - make test/cc - -after_script: - # Send coverage report to code climate - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT \ No newline at end of file From 84a89d017e6a7b6743a86a89d4d55a0dbb318065 Mon Sep 17 00:00:00 2001 From: Chesley Brown Date: Tue, 18 Oct 2022 12:57:43 -0300 Subject: [PATCH 3/6] Use github action for tests --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f47394e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: ci + +on: + push: + branches: + - master + pull_request: + +permissions: + contents: read + +env: + goVersion: 1.19 + mongodbVersion: 4.2 + +jobs: + test-unit: + name: test-unit + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: ${{ env.goVersion }} + - uses: actions/checkout@v3 + - run: make test/unit + + test-integration: + name: test-integration + runs-on: ubuntu-latest + steps: + - uses: supercharge/mongodb-github-action@1.8.0 + with: + mongodb-version: ${{ env.mongodbVersion }} + - uses: actions/setup-go@v3 + with: + go-version: ${{ env.goVersion }} + - uses: actions/checkout@v3 + - run: make test/integration From e37b0e1148a67fbd4981adac69cc0fcfb14f8c7a Mon Sep 17 00:00:00 2001 From: Chesley Brown Date: Tue, 18 Oct 2022 13:14:45 -0300 Subject: [PATCH 4/6] Added integration tag for mongo test --- checkers/mongo/mongo_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/checkers/mongo/mongo_test.go b/checkers/mongo/mongo_test.go index 10167d7..cb7f90c 100644 --- a/checkers/mongo/mongo_test.go +++ b/checkers/mongo/mongo_test.go @@ -1,3 +1,5 @@ +//go:build integration + package mongochk import ( From fb698a0602170f0dad23a235ae18ff6c0d8c29a1 Mon Sep 17 00:00:00 2001 From: Chesley Brown Date: Tue, 18 Oct 2022 13:18:23 -0300 Subject: [PATCH 5/6] Added spec version and fixed visibility --- in-repo.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/in-repo.yaml b/in-repo.yaml index 9fe1065..c123e72 100644 --- a/in-repo.yaml +++ b/in-repo.yaml @@ -1,3 +1,6 @@ +specVersion: v1 +visibility: public + owner: active: team: core @@ -5,4 +8,3 @@ owner: code-coverage: # please see https://invisionapp.atlassian.net/wiki/spaces/ICT/pages/888799838/Establishing+code+coverage+goals for how to set this value appropriately goal-percent: 100 -visibility: private From d46aa38945638b5bf9027ca1d084e69ec8a7239d Mon Sep 17 00:00:00 2001 From: Chesley Brown Date: Tue, 18 Oct 2022 13:21:00 -0300 Subject: [PATCH 6/6] Taking ownership of repo --- in-repo.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/in-repo.yaml b/in-repo.yaml index c123e72..ec48840 100644 --- a/in-repo.yaml +++ b/in-repo.yaml @@ -3,7 +3,10 @@ visibility: public owner: active: - team: core + team: platform-sre-eng + since: 2022-10-18 + history: + - team: core since: 2017-12-01 code-coverage: # please see https://invisionapp.atlassian.net/wiki/spaces/ICT/pages/888799838/Establishing+code+coverage+goals for how to set this value appropriately