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
* 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.