From 382e4765de0aa72e2860c70bf49baccdbb1f50d5 Mon Sep 17 00:00:00 2001 From: Nicolas Charles Date: Wed, 9 Sep 2020 12:12:31 +0200 Subject: [PATCH] Fixes #18181: improve documentation on rudder-tests --- README.md | 2 +- doc/TESTS.md | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fa26ff..1a3554d 100644 --- a/README.md +++ b/README.md @@ -39,4 +39,4 @@ Run a platform on AWS (see doc/PROVIDERS.md for details) : - use provider=aws in the platform description - that's all -See doc/TESTS.md to ad new tests ans scenarios +See doc/TESTS.md to add new tests ans scenarios diff --git a/doc/TESTS.md b/doc/TESTS.md index 48c214e..6b8ac62 100644 --- a/doc/TESTS.md +++ b/doc/TESTS.md @@ -76,4 +76,27 @@ This content can be generated from an existing directive, using: `rtf test from-directive ` +Running a test scenario +----------------------- + +Prerequisites: +You need ruby and serverspec installed on your system. + +rudder-test comes with a test scenario to test ncf: `ncf_tests` +To run it, you need an environement set up with an empty system, with hostname `agent` +` +ncf.json: +{ + "default":{ "run-with": "vagrant", "rudder-version": "6.1", "system": "debian10" }, + "agent": { "rudder-setup": "empty"} +} +` +Then set it up with rtf +`rtf platform setup ncf` + +And then run the scenario +`./rtf scenario ncf_tests ncf 6.1` + +If there are any error, you may inspect logs on the VM in `/tmp/tmp.bunch_of_letter/test/acceptance/` (by default the VM is +destroyed after the scenario is run, so you'll need to remove the platform.teardown() and change destroyOnError to False l294 in rtf)