aenix-io / etcd-operator

New generation community-driven etcd-operator!
https://etcd.aenix.io
Apache License 2.0
90 stars 13 forks source link

E2e tests #104

Closed kvaps closed 6 months ago

kvaps commented 7 months ago

Please collect the cases and write an approach for running e2e tests.

Internally we agreed:

hiddenmarten commented 7 months ago

As a start case, it would be nice to implement a simple upscale test: Deploy a minimalistic CR with replicas count as a 3, after that - check that the deployment was successful. After a successful check for 3 replicas deployment, upscale replicas count to 5 and repeat cluster health check. After all - delete CR.

sergeyshevch commented 7 months ago

I suggest slightly more complex approach that will test simple end user lifecycle

hiddenmarten commented 7 months ago

I suggest slightly more complex approach that will test simple end user lifecycle

  • Deploy all requirements (cert-manager etcd)
  • Deploy operator and its CRD
  • Create kind:EtcdCluster with some simple settings
  • Wait until ready
  • Delete kind:EtcdCluster
  • Delete operator
  • Check that all resources was cleaned up

I don't quite get how installation/deletion of operator tests any operator functionality...

I don't think it should be in the test itself, from my perspective it's just a pre-requisite for running tests (for me it makes no sense to install/remove operator several times in scope of tests)...

Kirill-Garbar commented 7 months ago

I think that installation and deinsallation of operator can take place, but not with golang tests. Let's make it separate: test of operator functionality and tests of helm chart.