Files
clrtrust/test/generate-clear.bats
Arzhan Kinzhalin e4743d8273 Fix tests.
Corrected expected file counts in the store where ls or find are used.
It's count + 1 now due to extra symlink clrtrust generates.
2019-01-02 14:03:31 -08:00

27 lines
526 B
Bash
Executable File

#!/usr/bin/env bats
# Copyright 2017 Intel Corporation
load test_lib
setup() {
find_clrtrust
setup_fs
cp $CERTS/c[1-4].pem $CLR_CLEAR_TRUST_SRC/trusted
}
@test "generate store, all provided by Clear Linux" {
$CLRTRUST generate
cnt=$(ls $STORE/anchors | wc -l)
[ $cnt -eq 9 ]
cnt=$($CLRTRUST list | grep ^id | wc -l)
[ $cnt -eq 4 ]
[ -f $STORE/compat/ca-roots.keystore ]
[ -f $STORE/compat/ca-roots.pem ]
}
teardown() {
remove_fs
}
# vim: ft=sh:sw=4:ts=4:et:tw=80:si:noai:nocin