openstack-k8s-operators / openstack-operator

Meta Operator for OpenStack
https://openstack-k8s-operators.github.io/openstack-operator/
Apache License 2.0
27 stars 76 forks source link

Enable all services in Functional tests #831

Open bshephar opened 3 months ago

bshephar commented 3 months ago

This change enables all of the services in the functional tests. This ensures that each service's code path is executed and should catch any potential issues before services are enabled in integration testing.

openshift-ci[bot] commented 3 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

bshephar commented 3 months ago

This will take a bit of work, it needs valid config for each service to validate. But it might be worth doing just to catch things early. Let's discuss before sinking more time into it. But as it stands, services will fail in the tests here because they don't have valid config to parse through their webhooks. Eg:

2024/06/07 12:54:40 http: panic serving 127.0.0.1:57148: runtime error: invalid memory address or nil pointer dereference
goroutine 2608 [running]:
net/http.(*conn).serve.func1()
        /Users/brendanshephard/sdk/go1.21.9/src/net/http/server.go:1868 +0xb0
panic({0x10657bca0?, 0x1078fa060?})
        /Users/brendanshephard/sdk/go1.21.9/src/runtime/panic.go:920 +0x26c
github.com/openstack-k8s-operators/nova-operator/api/v1beta1.(*NovaSpecCore).ValidateCellTemplates(0x140011fbb28, 0x14001b332c0)
        /Users/brendanshephard/go/pkg/mod/github.com/openstack-k8s-operators/nova-operator/api@v0.3.1-0.20240604091821-40e0e3428930/v1beta1/nova_webhook.go:156 +0x544
github.com/openstack-k8s-operators/nova-operator/api/v1beta1.(*NovaSpecCore).ValidateCreate(0x140011fbb28, 0x14001b332c0)
        /Users/brendanshephard/go/pkg/mod/github.com/openstack-k8s-operators/nova-operator/api@v0.3.1-0.20240604091821-40e0e3428930/v1beta1/nova_webhook.go:239 +0x28
github.com/openstack-k8s-operators/nova-operator/api/v1beta1.(*NovaSpec).ValidateCreate(...)
        /Users/brendanshephard/go/pkg/mod/github.com/openstack-k8s-operators/nova-operator/api@v0.3.1-0.20240604091821-40e0e3428930/v1beta1/nova_webhook.go:232
github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1.(*OpenStackControlPlane).ValidateCreateServices(0x140011fb000, 0x14001b32de0)
        /Users/brendanshephard/Code/openstack-k8s-operators/openstack-operator/apis/core/v1beta1/openstackcontrolplane_webhook.go:196 +0x2564
dprince commented 3 months ago

additionally, we are going to need to 'Simulate' that each services becomes Ready. The best way to do this seems via test helpers that live in the service operators themselves. Quite a few of those will need to be exposed or implemented here.

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bshephar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openstack-k8s-operators/openstack-operator/blob/main/OWNERS)~~ [bshephar] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment