clusterinthecloud / terraform

Terraform config for Cluster in the Cloud
https://cluster-in-the-cloud.readthedocs.io
MIT License
20 stars 23 forks source link

Add automated round-trip test for Oracle #36

Closed milliams closed 5 years ago

milliams commented 5 years ago

This creates a cluster, runs a test job, destroys the cluster and then checks that the output was as expected.

At a guess, a single run of this costs £0.40 (assuming OCPU hours are rounded up to 1 hour, regardless of how quick they were).

For PRs in this repo, we could run it on every PR either manually or automatically. For changes to the Ansible repo, if the test script lives here then we will have to run it manually. Otherwise, perhaps it should also be copied to the other repo?

christopheredsall commented 5 years ago

I could hardly not give this a thumbs up 😄

I think it is good to explicitly state in this PR title that we are currently testing the Oracle backend only. We'll need to introduce other tests as more cloud service providers are supported. Occasionally we'll need to test all of them to make sure a change introduced for one hasn't broken another one.

My opinion is that the value of CI is doing it on every PR which gives the person doing the merge the confidence that it won't (shouldn't) break the project. At £0.40 per test and the current project velocity I don't think this is an extravagance. (Obviously an opinion to revisit in the future.)

A change in either of the terraform or ansible repos could cause a cluster not to come up and run jobs. So my opinion is that we probably need a mechanism to do CI in the ansible repo too.