From 805bfcf1fbb82ece9a14a8f4cb5705e5037f1ddf Mon Sep 17 00:00:00 2001 From: Ross Fairbanks Date: Tue, 11 Jun 2024 18:14:35 +0200 Subject: [PATCH] fix: Electricity Maps test and go releaser version Signed-off-by: Ross Fairbanks --- .github/workflows/go-releaser.yaml | 2 +- pkg/provider/electricity_maps_test.go | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go-releaser.yaml b/.github/workflows/go-releaser.yaml index 6445897..57608ad 100644 --- a/.github/workflows/go-releaser.yaml +++ b/.github/workflows/go-releaser.yaml @@ -24,7 +24,7 @@ jobs: private_key: ${{ secrets.HOMEBREW_TAP_GITHUB_APP_PEM }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 + uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser version: latest diff --git a/pkg/provider/electricity_maps_test.go b/pkg/provider/electricity_maps_test.go index 2423f62..1a3c387 100644 --- a/pkg/provider/electricity_maps_test.go +++ b/pkg/provider/electricity_maps_test.go @@ -14,9 +14,15 @@ import ( var MockElectricityMapResponse = `{ "zone": "IN-KA", - "carbonIntensity": 312, - "datetime": "2020-01-01T00:00:00.000Z", - "updatedAt": "2020-01-01T00:00:01.000Z" + "history": [ + { + "zone": "IN-KA", + "carbonIntensity": 312, + "datetime": "2020-01-01T00:00:00.000Z", + "updatedAt": "2020-01-01T00:00:01.000Z", + "isEstimated": true + } + ] }` func Test_ElectricityMaps_SimpleRequest(t *testing.T) {