hydra-query 0.4.2

Query Hydra build and evaluation information for Nix packages
use assert_cmd::Command;
use predicates::prelude::*;

#[test]
fn test_help() {
    Command::cargo_bin("hydra-query")
        .unwrap()
        .arg("--help")
        .assert()
        .success()
        .stdout(predicate::str::contains("Query Hydra CI"));
}

#[test]
fn test_nonexistent_config_fails() {
    Command::cargo_bin("hydra-query")
        .unwrap()
        .args(["--config", "/nonexistent/path.json"])
        .env("SSL_CERT_FILE", "/nonexistent/ca-bundle.crt")
        .env("SSL_CERT_DIR", "/nonexistent/certs")
        .assert()
        .failure()
        .stderr(predicate::str::contains("failed to read config"));
}