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

tests: Fix time comparison by using UTC timezone #3529

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gogolok
Copy link
Contributor

@gogolok gogolok commented Oct 18, 2024

Is there a related GitHub Issue?

No.

https://cloudfoundry.slack.com/archives/C0297673ASK/p1729171006582719

What is this change about?

When running unit tests locally, some unit tests were failing on machines with local time != UTC.

Here's an extract (some lines left out):

Summarizing 3 Failures:
  [FAIL] Service Offering [It] returns the expected JSON
  .../api/presenter/service_offering_test.go:75
  [FAIL] Service Broker [It] returns the expected JSON
  .../api/presenter/service_broker_test.go:57
  [FAIL] Service Plan ForServicePlan [It] returns the expected JSON
  .../api/presenter/service_plan_test.go:100

expected
  "created_at": "1970-01-01T01:00:01+01:00",
to match JSON of
  "created_at": "1970-01-01T00:00:01Z",
  
  first mismatched key: "created_at"

Does this PR introduce a breaking change?

No.

Copy link

linux-foundation-easycla bot commented Oct 18, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: gogolok / name: Robert Gogolok (9327fc1)

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

Successfully merging this pull request may close these issues.

1 participant