Skip to content

Error when CLIENT_IPCPATH is not present with a useful message#163

Merged
paytonrules merged 2 commits intostagingfrom
log-when-client-ipc-path-is-not-present
Apr 15, 2020
Merged

Error when CLIENT_IPCPATH is not present with a useful message#163
paytonrules merged 2 commits intostagingfrom
log-when-client-ipc-path-is-not-present

Conversation

@paytonrules
Copy link
Copy Markdown
Contributor

The integration tests fail when CLIENT_IPCPATH isn't present would fail without a useful error message. So I gave them one.

Example:

/Users/eric/Projects/go/bin/ginkgo -r transformers/integration_tests/
Running Suite: IntegrationTests Suite
=====================================
Random Seed: 1586885536
Will run 75 of 86 specs

Failure [0.178 seconds]
[BeforeSuite] BeforeSuite
/Users/eric/Projects/go/src/github.com/makerdao/vdb-mcd-transformers/transformers/integration_tests/integration_tests_suite_test.go:27

  testing.toml IPC path or $CLIENT_IPCPATH env variable need to be set
  Expected
      <string>:
  not to be empty

  /Users/eric/Projects/go/src/github.com/makerdao/vdb-mcd-transformers/transformers/integration_tests/integration_tests_suite_test.go:40
------------------------------

Ran 75 of 0 Specs in 0.178 seconds
FAIL! -- 0 Passed | 75 Failed | 0 Pending | 0 Skipped
--- FAIL: TestIntegrationTests (0.18s)
FAIL

Ginkgo ran 1 suite in 6.578962481s
Test Suite Failed
make: *** [integrationtest] Error 1

Copy link
Copy Markdown
Contributor

@rmulhol rmulhol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😤

@paytonrules paytonrules force-pushed the log-when-client-ipc-path-is-not-present branch from 5fc8045 to 6552e35 Compare April 15, 2020 14:52
Kinda surprised this wasn't there already. Aren't you all on Macs?
When you forget the CLIENT_IPCPATH the integration tests would fail with
no message, because logrus wasn't tied to any output. However if you use
Expect here you not only get output, but you get it nicely color-coded
by ginkgo.
@paytonrules paytonrules force-pushed the log-when-client-ipc-path-is-not-present branch from 6552e35 to f458a99 Compare April 15, 2020 18:18
@paytonrules paytonrules merged commit 2e4e375 into staging Apr 15, 2020
@paytonrules paytonrules deleted the log-when-client-ipc-path-is-not-present branch April 28, 2020 15:05
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.

2 participants