Commit graph

9 commits

Author SHA1 Message Date
Jonas L
59fe4339d4
chore: add ansible-lint pre-commit hook (#293)
* chore: add ansible-lint pre-commit hook

* chore: galaxy.yml license field should be a list

* chore: fix ansible-lint errors
2023-08-09 11:32:23 +02:00
Jonas L
c5e0d429c5
test: implement integration testing framework (#239)
Fixes #203

The namespace used to differentiate the resources between CI pipelines, CI stages or even between test targets was broken and resulted in conflicting resource names. This PR ensure the resources names don't collide with each other by making sure we use the entire hcloud_prefix value as md5sum, and by including the target role names inside the resource names.

Create a setup/teardown framework to handle testing resources used by the tests.

To simplify the review process, additional changes such as splitting the setup/teardown task in the prepare.yml and cleanup.yml files will be done in future PRs (many files were renamed, and git will not preserve the file history after the PR squash).

* chore: move integrations targets files

* test: create integration common files

* test: fix resources name namespace using the magic hcloud_ns

* test: simplify requirements install

* test: rename hcloud_server test taskfiles
2023-07-26 16:09:48 +02:00
Jonas L
51f705c343
chore: use fqcn module names (#273) 2023-07-20 12:14:57 +02:00
Jonas L
939e039b9f
test: remove invalid tests collections requirements (#246) 2023-07-04 09:33:09 +02:00
Jonas L
02516d9a7b
refactor: prefer true/false over yes/no (#226)
* style: format md and yml files using prettier

* refactor: prefer true/false over yes/no
2023-06-21 10:49:54 +02:00
Julian Tölle
e218306028
test: various fixes for integration tests (#193)
* test: update for new locations

* test(cert): fix issues with random name failing the test

The variable hcloud_dns_test_domain used the random function to generate
a number from 1-100. This number changed between every usage of the
variable, so the test that compared the domain name of the cert to the
variable kept failing, as different numbers were generated.

By generating the number once and saving it into a fact, this is fixed.

* test: fix issues with long resource names

Server and volume names have restricted length (63 and 64 respectivly).

This can cause issues when the `hcloud_prefix` is of certain length. By
applying truncate, we can be sure to not reach the limit.

This issue mainly happened in our internal ci, as the hcloud_prefix variable
contains the hostname where the tests were running, and our hostnames are
quite long.
2023-02-13 10:48:26 +01:00
Lukas Kämmerling
eb45ae014c
Fix error handling and add test cases (#58)
* Fix error handling and add test cases

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2021-02-24 13:37:58 +01:00
Lukas Kämmerling
363598811e
Add Shippable CI (#2) 2020-04-14 08:34:22 +02:00
Ansible Core Team
36309bd27a Initial commit 2020-03-09 13:36:01 +00:00