From 35121f9c7f0deafab57d63d22d2717bd6670c3a4 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sun, 13 Dec 2015 17:35:45 +0100 Subject: [PATCH] Add option to document integration test providers seperately --- docs/conf.py | 9 +++++++++ docs/testing/index.rst | 2 +- docs/testing/integration_test_providers.rst | 1 - docs/testing/integration_test_providers/.gitignore | 3 +++ docs/testing/integration_test_providers/index.rst | 10 ++++++++++ tests/integration/README.rst | 2 +- tests/integration/providers/README.rst | 2 -- tests/integration/providers/ec2/README.rst | 2 ++ tests/integration/providers/virtualbox/README.rst | 7 +++++++ 9 files changed, 33 insertions(+), 5 deletions(-) delete mode 100644 docs/testing/integration_test_providers.rst create mode 100644 docs/testing/integration_test_providers/.gitignore create mode 100644 docs/testing/integration_test_providers/index.rst create mode 100644 tests/integration/providers/ec2/README.rst create mode 100644 tests/integration/providers/virtualbox/README.rst diff --git a/docs/conf.py b/docs/conf.py index a53c41e..2134d87 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -287,6 +287,15 @@ for readme_path in glob.glob('../bootstrapvz/plugins/*/README.rst'): include.write('.. include:: ' + path_to_readme) +for readme_path in glob.glob('../tests/integration/providers/*/README.rst'): + provider_name = os.path.basename(os.path.dirname(readme_path)) + include_path = os.path.join('testing/integration_test_providers', provider_name + '.rst') + if not os.path.exists(include_path): + path_to_readme = os.path.join('../../../tests/integration/providers', provider_name, 'README.rst') + with open(include_path, 'w') as include: + include.write('.. include:: ' + path_to_readme) + + # -- Create task overview graph data -------------------------------------- from docs import taskoverview diff --git a/docs/testing/index.rst b/docs/testing/index.rst index 5c0b339..f552ef5 100644 --- a/docs/testing/index.rst +++ b/docs/testing/index.rst @@ -7,6 +7,6 @@ Testing unit_tests integration_tests - integration_test_providers + integration_test_providers/index .. include:: ../../tests/README.rst diff --git a/docs/testing/integration_test_providers.rst b/docs/testing/integration_test_providers.rst deleted file mode 100644 index c81153e..0000000 --- a/docs/testing/integration_test_providers.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../tests/integration/providers/README.rst diff --git a/docs/testing/integration_test_providers/.gitignore b/docs/testing/integration_test_providers/.gitignore new file mode 100644 index 0000000..50db996 --- /dev/null +++ b/docs/testing/integration_test_providers/.gitignore @@ -0,0 +1,3 @@ +* +!index.rst +!.gitignore diff --git a/docs/testing/integration_test_providers/index.rst b/docs/testing/integration_test_providers/index.rst new file mode 100644 index 0000000..804c4cb --- /dev/null +++ b/docs/testing/integration_test_providers/index.rst @@ -0,0 +1,10 @@ +Integration test providers +========================== + +.. toctree:: + :maxdepth: 1 + :glob: + + * + +.. include:: ../../../tests/integration/providers/README.rst diff --git a/tests/integration/README.rst b/tests/integration/README.rst index 01c4f0f..a4e1d62 100644 --- a/tests/integration/README.rst +++ b/tests/integration/README.rst @@ -67,7 +67,7 @@ Missing parts ------------- The integration testing harness is in no way complete. -* It still has no support for providers other than virtualbox and EC2. +* It still has no support for providers other than Virtualbox, EC2 and Docker. * Creating an SSH connection to a booted instance is cumbersome and does not happen in any of the tests - this would be particularly useful when manifests are to be tested beyond whether they boot up. diff --git a/tests/integration/providers/README.rst b/tests/integration/providers/README.rst index 9452950..e69de29 100644 --- a/tests/integration/providers/README.rst +++ b/tests/integration/providers/README.rst @@ -1,2 +0,0 @@ -Integration test providers -========================== diff --git a/tests/integration/providers/ec2/README.rst b/tests/integration/providers/ec2/README.rst new file mode 100644 index 0000000..63c9e3b --- /dev/null +++ b/tests/integration/providers/ec2/README.rst @@ -0,0 +1,2 @@ +EC2 +--- diff --git a/tests/integration/providers/virtualbox/README.rst b/tests/integration/providers/virtualbox/README.rst new file mode 100644 index 0000000..9eb9e11 --- /dev/null +++ b/tests/integration/providers/virtualbox/README.rst @@ -0,0 +1,7 @@ +Virtualbox +---------- + + +Dependencies +~~~~~~~~~~~~ +vboxapi 1.0