mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-12-23 10:44:09 +01:00
without integration
This commit is contained in:
parent
078e2d9c2c
commit
b6186aa901
@ -15,7 +15,7 @@ impl Cli {
|
||||
let matches = self.cmd.get_matches_from(args);
|
||||
|
||||
match matches.subcommand() {
|
||||
Some(("generate", args)) => Ok(()),
|
||||
Some(("generate", _args)) => Ok(()),
|
||||
_ => eyre::bail!("command missing"),
|
||||
}
|
||||
}
|
||||
|
@ -132,10 +132,10 @@ impl Downloader {
|
||||
Ok(cli_bin_path)
|
||||
}
|
||||
|
||||
fn download(&self, path: PathBuf) -> eyre::Result<PathBuf> {
|
||||
fn download(&self, _path: PathBuf) -> eyre::Result<PathBuf> {
|
||||
let expected_checksum = self.expected_checksum()?;
|
||||
|
||||
let (actual_hash, tempbin) = self.extract_cli_archive()?;
|
||||
let (actual_hash, _tempbin) = self.extract_cli_archive()?;
|
||||
|
||||
if expected_checksum != actual_hash {
|
||||
eyre::bail!("downloaded CLI binary checksum doesn't match checksum from checksums.txt")
|
||||
|
@ -1,18 +0,0 @@
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use rust::dagger;
|
||||
|
||||
#[test]
|
||||
fn example_container() {
|
||||
let client = dagger::connect().unwrap();
|
||||
let alpine = client.container().from("alpine:3.16.2").unwrap();
|
||||
let out = alpine
|
||||
.exec(dagger::ContainerExecOpts {
|
||||
args: vec!["cat", "/etc/alpine-release"],
|
||||
})
|
||||
.stdout()
|
||||
.unwrap();
|
||||
|
||||
assert_eq!("3.16.2", out);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user