BMAC controller search for a condition but do not check if the result is nil. This could cause a panic. It happened on subsystem test, where a similar code is used. https://github.com/openshift/assisted-service/blob/f2d1db6f3a410a995def24d45842e00110c5311d/subsystem/kubeapi_test.go#L383 https://github.com/openshift/assisted-service/blob/f2d1db6f3a410a995def24d45842e00[…]0c5311d/internal/controller/controllers/bmh_agent_controller.go
Looking at the code again i saw that bnh check if conditions are nil https://github.com/openshift/assisted-service/blob/badfb5d77b0642688c06743cb5e304e6a29c62be/internal/controller/controllers/bmh_agent_controller.go#L365-L367 Fixing the test
in another look if we have a bug in the condition bmh controller will panic, fixed that.