Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Re-enable artifact reading test with new artifact format. #434

Merged
merged 1 commit into from
Apr 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions components/core/src/package/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,14 @@ mod test {
use super::*;

#[test]
#[ignore] // This is being ignored until a new artifact can be generated to replace this fixture
fn reading_artifact_metadata() {
let mut hart = PackageArchive::new(fixtures()
.join("core-hab-sup-0.4.0-20160416170100.hab"));
let mut hart =
PackageArchive::new(fixtures().join("happyhumans-possums-8.1.4-20160424223505.hart"));
let ident = hart.ident().unwrap();
assert_eq!(ident.origin, "core");
assert_eq!(ident.name, "hab-sup");
assert_eq!(ident.version, Some("0.4.0".to_string()));
assert_eq!(ident.release, Some("20160416170100".to_string()));
assert_eq!(ident.origin, "happyhumans");
assert_eq!(ident.name, "possums");
assert_eq!(ident.version, Some("8.1.4".to_string()));
assert_eq!(ident.release, Some("20160424223505".to_string()));
}

pub fn exe_path() -> PathBuf {
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions components/core/tests/fixtures/happyhumans-20160424223347.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SIG-PUB-1
happyhumans-20160424223347

YFt55lgI3l/vcTEp/7IFGIXgnrLr5bWMADbIvuHKkoY=
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SIG-SEC-1
happyhumans-20160424223347

AO92iutQKfCz6mWaPpQ8CqP2OxHW3aAVTVwXRQQMQLRgW3nmWAjeX+9xMSn/sgUYheCesuvltYwANsi+4cqShg==
Binary file not shown.
34 changes: 34 additions & 0 deletions components/core/tests/fixtures/plan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pkg_name=possums
pkg_origin=happyhumans
pkg_version=8.1.4
pkg_maintainer="The Habitat Maintainers <[email protected]>"
pkg_license=('apachev2')
pkg_source=nosuchfile.tar.gz
pkg_deps=()
pkg_build_deps=()

do_build() {
cp -v $PLAN_CONTEXT/signme.dat signme.dat
}

do_install() {
install -v -D signme.dat $pkg_prefix/share/signme.dat
}

# Turn the remaining default phases into no-ops

do_download() {
return 0
}

do_verify() {
return 0
}

do_unpack() {
return 0
}

do_prepare() {
return 0
}