From f8de95df4ba89d09a77dfdc6d94afaf74406a0a7 Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Fri, 28 Feb 2025 16:07:10 +0100 Subject: [PATCH] tests: Add bats tests for scans with results database --- tests/bats/002-scans.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/bats/002-scans.bats b/tests/bats/002-scans.bats index 695cf2796..e25dc6fd3 100644 --- a/tests/bats/002-scans.bats +++ b/tests/bats/002-scans.bats @@ -22,6 +22,16 @@ teardown() { gallia scan uds services --sessions 1 2 --check-session } +@test "scan services with database" { + local db_file="${BATS_TEST_NAME}.sqlite" + + gallia scan uds services --db "$db_file" --sessions 1 2 --check-session + + + # TODO: This is not finished; check here that the database contains expected fields + sqlite3 "$db_file" "SELECT * FROM run_meta;" >&3 +} + @test "scan sessions" { gallia scan uds sessions }