Add tests verifying handling of directives lacking commands
authorJacob Bachmeyer <jcb@gnu.org>
Thu, 20 Oct 2022 04:00:32 +0000 (23:00 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Thu, 20 Oct 2022 04:00:32 +0000 (23:00 -0500)
testsuite/gatekeeper.all/01_loose.exp

index b844f8ba1f2f47ab38be0cf4641ebc2c8b2ca9ee..98acd612a3bdf9e7fb53c97f35f0768fa8f6f373 100644 (file)
@@ -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" {