kube_clusterSourcetestFakeCtl

class FakeCtl


Fake ctl that records every command and returns canned responses. The test wires this into the cluster → connection → ctl chain so that Persistence#kubectl goes through it without touching a real cluster.

Definitions

def stub_response(substring, response)

Queue a response for the next command that includes +substring+.

Implementation

def stub_response(substring, response)
  @responses[substring] = response
end