ceph / ceph-csi-operator

Kubernetes operator for managing the CephCSI plugins
Apache License 2.0
16 stars 16 forks source link

unit tests failing with current main #174

Open obnoxxx opened 3 hours ago

obnoxxx commented 3 hours ago

Describe the bug

With a current checkout of the mainbranch of this repository, make testis failing two unit tests: the Driver controller test and the ClientProfile controller test.

Environment details

Steps to reproduce

Steps to reproduce the behavior:

  1. Setup details:( set up dev environment on Linux or MacOS.
  2. Deployment to trigger the issue: check out main branch of this repo repo. and run make test
  3. See error

Actual results

Driver controller test and ClientProfile controller tests fail.

driver controller test error:

  [FAILED] in [AfterEach] - /home/obnox/go/src/github.com/ceph/ceph-csi-operator/internal/controller/driver_controller_test.go:64 @ 11/15/24 19:14:32.074
  << Timeline

  [FAILED] Expected success, but got an error:
      <*errors.StatusError | 0xc00044d720>: 
      Driver.csi.ceph.io "test-resource" is invalid: <nil>: Invalid value: "object": .metadata.name must match: '[<prefix>.](rbd|cephfs|nfs).csi.ceph.com'
      {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",

ClientProfile controller test error:

  STEP: creating the custom resource for the Kind ClientProfile @ 11/15/24 19:14:30.024
  [FAILED] in [BeforeEach] - /home/obnox/go/src/github.com/ceph/ceph-csi-operator/internal/controller/clientprofile_controller_test.go:56 @ 11/15/24 19:14:32.032
  [FAILED] in [AfterEach] - /home/obnox/go/src/github.com/ceph/ceph-csi-operator/internal/controller/clientprofile_controller_test.go:64 @ 11/15/24 19:14:32.034
  << Timeline

  [FAILED] Expected success, but got an error:
      <*errors.StatusError | 0xc000278d20>: 
      ClientProfile.csi.ceph.io "test-resource" is invalid: spec.cephConnectionRef: Invalid value: "object": '.name' cannot be empty
      {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "ClientProfile.csi.ceph.io \"test-resource\" is invalid: spec.cephConnectionRef: Invalid value: \"object\": '.name' cannot be empty",
              Reason: "Invalid",
              Details: {
                  Name: "test-resource",
                  Group: "csi.ceph.io",
                  Kind: "ClientProfile",
                  UID: "",
                  Causes: [
                      {
                          Type: "FieldValueInvalid",
                          Message: "Invalid value: \"object\": '.name' cannot be empty",
                          Field: "spec.cephConnectionRef",
                      },
                  ],

Expected behavior

make testshould succeed.

Logs

see paste above.

Additional context

I am seeing the same behavior on Linux(Fedora 41 ) and MacOS (Sonoma 14.6.1)

obnoxxx commented 3 hours ago

/assign

github-actions[bot] commented 3 hours ago

Thanks for taking this issue! Let us know if you have any questions!