feat(import): complete OpenAPI onboarding and verify delivery
This commit is contained in:
1 parent
bb3e376767
commit
e93de7015a
244 files changed
+57020
-5139
No files matched your search
@@ -40,7 +40,20 @@ fn plan_is_deterministic_and_committed_contract_is_current() {
|
||||
);
|
||||
assert_eq!(first.stdout, second.stdout);
|
||||
let plan: serde_json::Value = serde_json::from_slice(&first.stdout).unwrap();
|
||||
assert_eq!(plan["sequence"].as_array().unwrap().len(), 13);
|
||||
assert_eq!(plan["sequence"].as_array().unwrap().len(), 15);
|
||||
let target = command(&["plan", "--target-version"], None);
|
||||
assert!(
|
||||
target.status.success(),
|
||||
"{}",
|
||||
String::from_utf8_lossy(&target.stderr)
|
||||
);
|
||||
let last_version = plan["sequence"].as_array().unwrap().last().unwrap()["version"]
|
||||
.as_i64()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
String::from_utf8(target.stdout).unwrap(),
|
||||
format!("{last_version}\n")
|
||||
);
|
||||
|
||||
let checked = command(&["plan", "--check"], None);
|
||||
assert!(
|
||||
@@ -50,6 +63,15 @@ fn plan_is_deterministic_and_committed_contract_is_current() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_plan_option_is_rejected_without_success_output() {
|
||||
let output = command(&["plan", "--not-an-option"], None);
|
||||
assert!(!output.status.success());
|
||||
assert!(output.stdout.is_empty());
|
||||
let diagnostic: serde_json::Value = serde_json::from_slice(&output.stderr).unwrap();
|
||||
assert_eq!(diagnostic["code"], "invalid_command");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_command_is_bounded_and_does_not_echo_arguments() {
|
||||
let canary = "secret-command-canary";
|
||||
@@ -82,7 +104,7 @@ async fn database_only_config_can_apply_and_preflight_a_fresh_schema() {
|
||||
);
|
||||
let result: serde_json::Value = serde_json::from_slice(&preflight.stdout).unwrap();
|
||||
assert_eq!(result["status"], "current");
|
||||
assert_eq!(result["version"], 13);
|
||||
assert_eq!(result["version"], 15);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in new issue
Block a user