Skip to content

Commit

Permalink
Update tests, identify that this is version breaking (0.11.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed Jan 31, 2024
1 parent ca34b71 commit 1da3f67
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "omicron-zone-package"
version = "0.10.1"
version = "0.11.0"
authors = ["Sean Klein <[email protected]>"]
edition = "2021"
#
Expand Down
23 changes: 15 additions & 8 deletions tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
mod test {
use anyhow::Result;
use camino::Utf8PathBuf;
use omicron_zone_package::config;
use omicron_zone_package::target::Target;
use std::convert::TryInto;
use std::fs::File;
use std::io::Read;
use tar::Archive;

use omicron_zone_package::blob::download;
use omicron_zone_package::config;
use omicron_zone_package::package::BuildConfig;
use omicron_zone_package::progress::NoProgress;
use omicron_zone_package::target::Target;

fn entry_path<'a, R>(entry: &tar::Entry<'a, R>) -> Utf8PathBuf
where
Expand Down Expand Up @@ -62,8 +63,9 @@ mod test {

// Create the packaged file
let out = camino_tempfile::tempdir().unwrap();
let build_config = BuildConfig::default();
package
.create_for_target(&Target::default(), package_name, out.path())
.create(package_name, out.path(), &build_config)
.await
.unwrap();

Expand Down Expand Up @@ -100,8 +102,9 @@ mod test {

// Create the packaged file
let out = camino_tempfile::tempdir().unwrap();
let build_config = BuildConfig::default();
package
.create_for_target(&Target::default(), package_name, out.path())
.create(package_name, out.path(), &build_config)
.await
.unwrap();

Expand Down Expand Up @@ -142,8 +145,9 @@ mod test {

// Create the packaged file
let out = camino_tempfile::tempdir().unwrap();
let build_config = BuildConfig::default();
package
.create_for_target(&Target::default(), package_name, out.path())
.create(package_name, out.path(), &build_config)
.await
.unwrap();

Expand Down Expand Up @@ -196,8 +200,9 @@ mod test {

// Create the packaged file
let out = camino_tempfile::tempdir().unwrap();
let build_config = BuildConfig::default();
package
.create_for_target(&Target::default(), package_name, out.path())
.create(package_name, out.path(), &build_config)
.await
.unwrap();

Expand Down Expand Up @@ -226,10 +231,11 @@ mod test {
let mut batch_pkg_names: Vec<_> = batch.iter().map(|(name, _)| *name).collect();
batch_pkg_names.sort();
assert_eq!(batch_pkg_names, vec!["pkg-1", "pkg-2"]);
let build_config = BuildConfig::default();
for (package_name, package) in batch {
// Create the packaged file
package
.create_for_target(&Target::default(), package_name, out.path())
.create(package_name, out.path(), &build_config)
.await
.unwrap();
}
Expand All @@ -240,8 +246,9 @@ mod test {
let package_name = "pkg-3";
assert_eq!(batch_pkg_names, vec![package_name]);
let package = cfg.packages.get(package_name).unwrap();
let build_config = BuildConfig::default();
package
.create_for_target(&Target::default(), package_name, out.path())
.create(package_name, out.path(), &build_config)
.await
.unwrap();

Expand Down

0 comments on commit 1da3f67

Please sign in to comment.