Repository navigation
feat: implement the driver status hook - #88
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
kitchen listcould only report what the state file remembered, becauseKitchen::Driver::Base#statuswas never overridden.vRA is now asked directly, so a deployment that failed to build, is still building, or was destroyed from the vRA console shows its real state without a converge.
liveis true only forCREATE_SUCCESSFUL, matchingVra::Deployment#successful?.CREATE_INPROGRESSandCREATE_FAILEDreportlive: falsebut keep their own name, which distinguishes "not ready yet" from "will never be ready" — a distinction a bare boolean loses.Falling back rather than failing
kitchen listshould not raise on a driver it is only interrogating, so the base "unknown" answer covers: no deployment in state, vRA answeringVra::Exception::NotFound(a real answer — the deployment is gone), and vRA being unreachable.lookup_deploymentrescues::StandardError, with the leading::becauseKitchen::StandardErrorwould otherwise win lexical lookup insidemodule Kitchenand narrow the rescue to Test Kitchen's own errors.Verification
rake test— 55 examples, 0 failures (48 before; 7 new),rakeexit 0cookstyle --chefstyle— 5 files, no offensesyard stats— 100% documented