wai-rs tests: the quickstart installer installs this crate's version #532
1 changed files with 15 additions and 0 deletions
|
|
@ -3,6 +3,8 @@
|
|||
//!
|
||||
//! - `wai ops list`, `search`, `schema` and `export` read the catalogue, and the export is
|
||||
//! the committed `wai/catalogue/ops.json` (a drifted copy exits 1);
|
||||
//! - the quickstart installer (`wai/quickstart/install.sh`) installs this crate's version, as
|
||||
//! the release job requires of a tag `wai-v<version>`;
|
||||
//! - every operation answers `--help` from its catalogue entry, and its mechanical form
|
||||
//! `wai <noun> <verb>` runs it as its CLI spelling does;
|
||||
//! - the exit codes: 1 a check that failed, 2 usage, 3 permission, 4 confirmation required,
|
||||
|
|
@ -75,6 +77,19 @@ fn ops_list_names_every_operation_and_export_is_the_committed_file() {
|
|||
assert!(text(&o).contains("regenerate"), "{}", text(&o));
|
||||
}
|
||||
|
||||
/// The release job's first check (wai-release.yml) refuses a tag whose installer installs
|
||||
/// another version, after the version bump has merged; this holds the bump to it.
|
||||
#[test]
|
||||
fn the_quickstart_installer_installs_this_version() {
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
let install = std::fs::read_to_string(wai_dir().join("quickstart/install.sh")).unwrap();
|
||||
let line = format!("VERSION=\"${{WAI_VERSION:-{version}}}\"");
|
||||
assert!(
|
||||
install.lines().any(|l| l == line),
|
||||
"wai/quickstart/install.sh does not install {version}, this crate's version: it needs the line {line}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ops_search_and_schema_answer_offline() {
|
||||
let d = scratch("search");
|
||||
|
|
|
|||
Loading…
Reference in a new issue