Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Clean up output for Hardware CLI #43

Merged
merged 5 commits into from
Jan 27, 2020
Merged

Clean up output for Hardware CLI #43

merged 5 commits into from
Jan 27, 2020

Conversation

perigrin
Copy link
Contributor

This PR cleans up the output for the Hardware CLI. I had inadvertently not implemented stringification for the hardware structs in my rush to get something functional out the door.

This also adds tests for the Hardware CLI output, and implements a proof of concept for testing the other CLI outputs going forward.

Finally I cleaned up a couple places that go vet was complaining about in the code, and started migrating tests to use stretchr/testify because it's output is easier for debugging test failures than my hand rolled output.

Copy link
Contributor

@karenetheridge karenetheridge left a comment

Choose a reason for hiding this comment

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

tests fail, and it appears a rebase against master is needed

@@ -18,15 +18,15 @@ interactions:
Cache-Control:
- no-cache
Date:
- Mon, 13 Jan 2020 23:16:20 GMT
- Sun, 26 Jan 2020 19:04:25 GMT
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just churn and committing these is surely not needed.

what are you doing to generate these changes? when I make test, nothing is altered in the repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To generate these files simply remove fixtures/conch-v3/*.yaml and they'll be recreated on the next call to go test (which make test calls) by attempting to hit whatever Conch API endpoint is configured in your shell. I create them locally by hitting a fresh dev server with an empty database.

I've opened #44 to track replacing this system with something less ugly. Sungo specifically warned me that Lane had tried something like this and it sucked, and it does … I'm just not sure how I want to replace everything. Half re-implementing the API using Gock isn't really more appealing … yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also the most recent rebase reduces the number of fixtures changed to just the ones directly impacted.

@perigrin perigrin merged commit 24d8af1 into master Jan 27, 2020
@perigrin perigrin deleted the 36-add-hardware-cli branch January 27, 2020 22:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants