Skip to content

Failing test #22

@mgazz

Description

@mgazz

Preparing the testing pipeline I experienced the following error while running the tests:

Will run 155 of 155 specs
------------------------------
[BeforeSuite] [FAILED] [6.464 seconds]
[BeforeSuite] 
/Users/mgazz/workspace/composable-resource-operator/internal/controller/suite_test.go:162

  Timeline >>
  STEP: bootstrapping test environment @ 03/12/26 09:04:36.134
  2026-03-12T09:04:36Z  DEBUG   controller-runtime.test-env     starting control plane
  2026-03-12T09:04:39Z  ERROR   controller-runtime.test-env     unable to start the controlplane        {"tries": 0, "error": "timeout waiting for process kube-apiserver to start successfully (it may have failed to start, or stopped unexpectedly before becoming ready)"}
  sigs.k8s.io/controller-runtime/pkg/envtest.(*Environment).startControlPlane
        /Users/mgazz/.gvm/pkgsets/go1.24/global/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/envtest/server.go:366
  sigs.k8s.io/controller-runtime/pkg/envtest.(*Environment).Start
        /Users/mgazz/.gvm/pkgsets/go1.24/global/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/envtest/server.go:279
  github.com/CoHDI/composable-resource-operator/internal/controller.init.func3
        /Users/mgazz/workspace/composable-resource-operator/internal/controller/suite_test.go:204
  github.com/onsi/ginkgo/v2/internal.extractBodyFunction.func3
        /Users/mgazz/.gvm/pkgsets/go1.24/global/pkg/mod/github.com/onsi/ginkgo/v2@v2.23.4/internal/node.go:475
  github.com/onsi/ginkgo/v2/internal.(*Suite).runNode.func3
        /Users/mgazz/.gvm/pkgsets/go1.24/global/pkg/mod/github.com/onsi/ginkgo/v2@v2.23.4/internal/suite.go:894
  2026-03-12T09:04:42Z  DEBUG   controller-runtime.test-env     installing CRDs
  2026-03-12T09:04:42Z  DEBUG   controller-runtime.test-env     reading CRDs from path  {"path": "../../config/crd/bases"}
  2026-03-12T09:04:42Z  DEBUG   controller-runtime.test-env     read CRDs from file     {"file": "cro.hpsys.ibm.ie.com_composabilityrequests.yaml"}
  2026-03-12T09:04:42Z  DEBUG   controller-runtime.test-env     read CRDs from file     {"file": "cro.hpsys.ibm.ie.com_composableresources.yaml"}
  [FAILED] in [BeforeSuite] - /Users/mgazz/workspace/composable-resource-operator/internal/controller/suite_test.go:205 @ 03/12/26 09:04:42.598
  << Timeline

  [FAILED] Unexpected error:
      <*fmt.wrapError | 0x140004b0cc0>: 
      unable to install CRDs onto control plane: unable to read CRD files: stat /Users/mgazz/go/pkg/mod/github.com/metal3-io/cluster-api-provider-metal3@v1.9.3/config/crd/bases: no such file or directory
      {
          msg: "unable to install CRDs onto control plane: unable to read CRD files: stat /Users/mgazz/go/pkg/mod/github.com/metal3-io/cluster-api-provider-metal3@v1.9.3/config/crd/bases: no such file or directory",
          err: <*fmt.wrapError | 0x140004b0c80>{
              msg: "unable to read CRD files: stat /Users/mgazz/go/pkg/mod/github.com/metal3-io/cluster-api-provider-metal3@v1.9.3/config/crd/bases: no such file or directory",
              err: <*fs.PathError | 0x140006bf4a0>{
                  Op: "stat",
                  Path: "/Users/mgazz/go/pkg/mod/github.com/metal3-io/cluster-api-provider-metal3@v1.9.3/config/crd/bases",
                  Err: <syscall.Errno>0x2,
              },
          },
      }
  occurred
  In [BeforeSuite] at: /Users/mgazz/workspace/composable-resource-operator/internal/controller/suite_test.go:205 @ 03/12/26 09:04:42.598
------------------------------

Summarizing 1 Failure:
  [FAIL] [BeforeSuite] 
  /Users/mgazz/workspace/composable-resource-operator/internal/controller/suite_test.go:205

Ran 0 of 155 Specs in 7.551 seconds
FAIL! -- A BeforeSuite node failed so all tests were skipped.
--- FAIL: TestControllers (7.55s)
FAIL
coverage: 0.0% of statements
FAIL    github.com/CoHDI/composable-resource-operator/internal/controller       8.835s
        github.com/CoHDI/composable-resource-operator/internal/utils            coverage: 0.0% of statements
ok      github.com/CoHDI/composable-resource-operator/internal/webhook/v1alpha1 10.209s coverage: 73.2% of statements
FAIL
make: *** [test] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions