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

Update Validation Endpoints #63

Merged
merged 3 commits into from
Oct 2, 2020
Merged

Conversation

perigrin
Copy link
Contributor

@perigrin perigrin commented Oct 2, 2020

This closes #59 but removing the ValidationStatesWithResults array and only expecting a single entity to be returned. This required a minor change to the templates and updating the fixtures to return a 404 instead of a 200 + []

As a side effect, I also updated the make file to handle the fact that I was attempting to run tests in TZ=EST and they were expecting TZ=UTC. I've also moved the dependency management to go mod which comes with Go now.

@perigrin perigrin self-assigned this Oct 2, 2020
fixtures/conch-v3/device.yaml Show resolved Hide resolved
fixtures/conch-v3/device.yaml Show resolved Hide resolved
templates.go Outdated Show resolved Hide resolved
@perigrin perigrin force-pushed the chris/59-update-validation-endpoints branch 2 times, most recently from b2cf67e to 4f79e7e Compare October 2, 2020 20:04
@karenetheridge
Copy link
Contributor

karenetheridge commented Oct 2, 2020

looks good other than the Content-Length.

I had to double-check, but indeed it might be possible to return a validation_state with no results (the json schema in response.yaml doesn't state a restriction, and it is possible in the database to have a validation_state with no associated results, although this probably would be the result of a database accident, as we should always be creating a validation_state with at least one result (otherwise the plan had no validations in it, or every validation skipped its check, which would be weird) -- so it's reasonable to check for results before printing them.

@perigrin perigrin force-pushed the chris/59-update-validation-endpoints branch from 4f79e7e to a517898 Compare October 2, 2020 20:31
@perigrin
Copy link
Contributor Author

perigrin commented Oct 2, 2020

kosh, I think, will blow up if we don't fill the struct properly (it'll assume it was a parse error on the JSON I believe). Adding more error checking and a better handling of responses is on my list for next week.

@perigrin perigrin merged commit c8b6943 into master Oct 2, 2020
@perigrin perigrin deleted the chris/59-update-validation-endpoints branch October 2, 2020 20:35
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.

Support Validation Endpoint Changes in Conch 3.0.2
2 participants