Hostea testing and domain name

For testing, a new Hostea instance is created and has:

  • Credentials to an OpenStack tenant that is empty
  • A Woodpecker CI associated with a Gitea repository containing a ~/.enough/example.com with nothing in it but the OpenStack credentials (same as the quick start really)
  • A script that will be run by the CI on every push and that will essential run enough --domain example.com

The test will consist of writing the repository, pushing its content and asserting the expected side effects. Now the question is … what domain to use in place of example.com for that to work?

  • Option A: do it the right way so that it simplifies the installation steps to the very minimum and use the Enough API to allocate a subdomain and use that. It however requires running a GitLab instance + the API by re-using how it is done for tests. Not very complex but not trivial either.
  • Option B: take a shortcut and allocate a subdomain from api.enough.community for each tests.

With Option A the operations required to deploy Hostea in production are simpler because the person only has to worry about a single domain name. With Option B deploying a Hostea production setup requires manually creating two domains and configuring Hostea to know that one is for hosting instances and the other is the primary domain.

Since Hostea is in the early stages of its development, I’ll go with Option B although it is less user friendly because I feel that Option A would be over engineering at this stage. Also I don’t see any obstacle to switching to Option B later on to reduce part of the manual steps.