Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add CI check for test fixture diffs #458

Closed
damemi opened this issue Jul 22, 2022 · 1 comment
Closed

Add CI check for test fixture diffs #458

damemi opened this issue Jul 22, 2022 · 1 comment
Assignees

Comments

@damemi
Copy link
Contributor

damemi commented Jul 22, 2022

#452 introduced a new diff when recording new fixtures:

$ exporter/collector/integrationtest$ go run cmd/recordfixtures/main.go
...
$ git diff
diff --git a/exporter/collector/integrationtest/testdata/fixtures/metrics_multi_project_expected.json b/exporter/collector/integrationtest/testdata/fixtures/metrics_multi_project_expected.json
index c513b6e..92ab158 100644
--- a/exporter/collector/integrationtest/testdata/fixtures/metrics_multi_project_expected.json
+++ b/exporter/collector/integrationtest/testdata/fixtures/metrics_multi_project_expected.json
@@ -1,7 +1,7 @@
 {
   "createTimeSeriesRequests": [
     {
-      "name": "projects/fake-other-project",
+      "name": "projects/fakeprojectid",
       "timeSeries": [
         {
           "metric": {
@@ -352,7 +352,7 @@
       ]
     },
     {
-      "name": "projects/fakeprojectid",
+      "name": "projects/fake-other-project",
       "timeSeries": [
         {
           "metric": {

We should add a CI check to make sure fixtures are updated before merging so irrelevant changes don't get added later

@damemi damemi self-assigned this Jul 22, 2022
@damemi
Copy link
Contributor Author

damemi commented Aug 1, 2022

fixed by #460

@damemi damemi closed this as completed Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant