Skip to content

feat: implement the driver status hook - #253

Merged
tas50 merged 1 commit into
mainfrom
feat/status-hook
Aug 24, 2026
Merged

feat: implement the driver status hook#253
tas50 merged 1 commit into
mainfrom
feat/status-hook

Conversation

@tas50

@tas50 tas50 commented Aug 24, 2026

Copy link
Copy Markdown
Member

kitchen list had nothing to report for this driver beyond what the state file remembered, because Kitchen::Driver::Base#status was never overridden.

def status(state)
  return super unless state[:server_id]

  server = lookup_server(state[:server_id])
  return super unless server
  ...
end

Nova is now asked directly, so a server that was deleted out from under Test Kitchen, or is stuck in BUILD, or has gone to ERROR, is visible without a converge.

live is true only for ACTIVE, matching fog's own ready?.

Three cases fall back to the base "unknown" answer rather than raising, because kitchen list should never blow up on a driver it is merely interrogating: no server in state, Nova does not know the id, and the cloud cannot be reached. The lookup honours disable_ssl_validation the same way create and destroy do.

A note on super

Kitchen::Driver::Base#status only exists in Test Kitchen 4.1.0 and later, and only 4.1.0+ calls driver.status, so the super calls are unreachable on a version that lacks them. This matches the pattern already in kitchen-cloudstack, kitchen-ec2, and kitchen-google.

Verification

  • rake test367 examples, 0 failures (360 before; 7 new), rake exit 0
  • cookstyle --chefstyle — 11 files, no offenses
  • yard stats — 100% documented

@tas50
tas50 merged commit e32a3c8 into main Aug 24, 2026
8 checks passed
@tas50
tas50 deleted the feat/status-hook branch August 24, 2026 03:01
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