Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
keyset add test: skip non-x86_64 arch
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <[email protected]>
  • Loading branch information
hallyn committed Aug 21, 2023
1 parent 934c4b0 commit 49e71af
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/keyset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function teardown() {
}

@test "Create new keysets" {
if [ "$(arch)" != "x86_64" ]; then
skip "Not supported on $(arch)"
fi
trust keyset add zomg
trust keyset add --org "My organization" homenet
cnt=$(trust keyset list | wc -l)
Expand Down
14 changes: 14 additions & 0 deletions tests/project.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,25 @@ function teardown() {
}

@test "Keyset creation creates default project" {
if [ "$(arch)" != "x86_64" ]; then
skip "Not supported on $(arch)"
fi
trust keyset add zomg
trust project list zomg | grep default
}

@test "Create project" {
trust keyset add snakeoil
trust project add snakeoil newproject
trust project list snakeoil | grep newproject
cnt=$(trust project list snakeoil | wc -l)
[ $cnt -eq 2 ]
}

@test "Create project in custom keyset" {
if [ "$(arch)" != "x86_64" ]; then
skip "Not supported on $(arch)"
fi
trust keyset add zomg
trust project add zomg newproject
trust project list zomg | grep newproject
Expand Down
9 changes: 9 additions & 0 deletions tests/sudi.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,26 @@ function teardown() {
}

@test "Keyset creation creates sudi" {
if [ "$(arch)" != "x86_64" ]; then
skip "Not supported on $(arch)"
fi
trust keyset add zomg
trust sudi list zomg default
}

@test "Project creation creates sudi" {
if [ "$(arch)" != "x86_64" ]; then
skip "Not supported on $(arch)"
fi
trust keyset add zomg
trust project add zomg newproject
trust sudi list zomg newproject
}

@test "Create sudi" {
if [ "$(arch)" != "x86_64" ]; then
skip "Not supported on $(arch)"
fi
trust keyset add zomg
trust project add zomg newproject
trust sudi add zomg newproject # auto-create uuid
Expand Down

0 comments on commit 49e71af

Please sign in to comment.