From 5b91b4f5e71e0c4077687235b38d12c8f75a8472 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Thu, 31 Mar 2022 14:50:12 +0100
Subject: [PATCH] Move "float run" from test-driver "init" command to "run"

---
 test-driver | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/test-driver b/test-driver
index d2fa7c33..12e943b3 100755
--- a/test-driver
+++ b/test-driver
@@ -72,10 +72,6 @@ run_init() {
     log Running init-credentials playbook
     ${float_dir}/float run init-credentials.yml \
         || die "failed to run the init-credentials playbook"
-
-    log Running main playbook
-    ${float_dir}/float run site.yml \
-        || die "failed to run the main playbook"
 }
 
 run_cleanup() {
@@ -90,14 +86,15 @@ Usage: test-driver [COMMAND] [DIR]
 Commands:
 
   init       Initialize the test environment (turn up VMs, set up
-             credentials, run the main float playbook)
+             credentials, ensure VMs are reachable)
 
   wait-ready Wait until the VMs are ready (part of "init")
 
   cleanup    Cleanup the test environment (turn down VMs, etc)
 
-  run        Run the test suite, using the playbooks specified by
-             the remaining command-line arguments
+  run        Run the main float playbook, and the test suite, using
+             the playbooks specified by the remaining command-line
+             arguments
 
 If DIR is specified, chdir there before running anything.
 
@@ -138,6 +135,10 @@ case "$cmd" in
         ;;
 
     run)
+        log Running main playbook
+        ${float_dir}/float run site.yml \
+            || die "failed to run the main playbook"
+
         for playbook in "${float_dir}/test/integration-test.yml" "$@"; do
             log Running test playbook ${playbook}
             ${float_dir}/float run ${playbook} \
-- 
GitLab