From 2ba26bac127386d0f36b26087e32e7ab5dd379be Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 19 Oct 2022 23:00:32 -0500 Subject: [PATCH] Add tests verifying handling of directives lacking commands --- testsuite/gatekeeper.all/01_loose.exp | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/testsuite/gatekeeper.all/01_loose.exp b/testsuite/gatekeeper.all/01_loose.exp index b844f8b..98acd61 100644 --- a/testsuite/gatekeeper.all/01_loose.exp +++ b/testsuite/gatekeeper.all/01_loose.exp @@ -272,6 +272,39 @@ check_loose_directive "bogus: signed for package with no email address" { ftp-upload-script@gnu.org ftp-upload-report@gnu.org } +check_loose_directive "bogus: no actual command" { + directive { + version 1.2 + directory foo + comment "no actual command here" + } dsig { good 04 1000 } +} file-tree { + { incoming stage pub archive } empty {} + { in-stage } files { foo.directive.asc } +} log { + validate,no-op "null directive rejected" +} email-to { + ftp-upload-script@gnu.org ftp-upload-report@gnu.org + foo@example.org foo@example.gnu.org foo@example.net +} + +check_loose_directive "bogus: set 'replace' but no actual command" { + directive { + version 1.2 + directory foo + replace true + comment "replace does not count as a command" + } dsig { good 05 1000 } +} file-tree { + { incoming stage pub archive } empty {} + { in-stage } files { foo.directive.asc } +} log { + validate,no-op "null directive rejected" +} email-to { + ftp-upload-script@gnu.org ftp-upload-report@gnu.org + foo@example.org foo@example.gnu.org foo@example.net +} + # ---------------------------------------- check_loose_directive "create symlink" { -- 2.25.1