Documentation
¶
Overview ¶
Package cloudcontract checks requests and answers against Conch Cloud's contract (conch-cloud's contract/openapi.yaml), for the fakes conch's tests put in the control plane's place. The contract is owned by conch-cloud; it is read from a checkout beside this one (or CONCH_CLOUD_CONTRACT), and conch's own CI has none, so a test that finds no contract says so and checks behaviour against its fake alone.
Only the subset of JSON Schema the contract uses is understood. Tests import this package; nothing conch ships does.
Index ¶
Constants ¶
const Env = "CONCH_CLOUD_CONTRACT"
Env names an openapi.yaml to check against.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct {
Path string
// contains filtered or unexported fields
}
Spec is a loaded contract.
func Load ¶
Load is the contract of version (or a later one of the same major), or nil with why it is not there.
func (*Spec) CheckRequest ¶
checkRequest is every way a request to path breaks the contract.
func (*Spec) CheckResponse ¶
checkResponse is every way an answer breaks the contract.