Skip to content

Some tests do not run locally (macOS) #1387

Open
@akurinnoy

Description

@akurinnoy

Is your task related to a problem? Please describe

Trying to run tests locally in macOS I noticed that some tests did not even run with the following error:

  [FAILED] Unexpected error:
      <*fmt.wrapError | 0xc0003ea340>:
      unable to start control plane itself: failed to start the controlplane. retried 5 times: fork/exec ../../../bin/k8s/1.24.2-linux-amd64/etcd: no such file or directory
      {
          msg: "unable to start control plane itself: failed to start the controlplane. retried 5 times: fork/exec ../../../bin/k8s/1.24.2-linux-amd64/etcd: no such file or directory",
          err: <*fmt.wrapError | 0xc0003ea320>{
              msg: "failed to start the controlplane. retried 5 times: fork/exec ../../../bin/k8s/1.24.2-linux-amd64/etcd: no such file or directory",
              err: <*fs.PathError | 0xc0003e77a0>{
                  Op: "fork/exec",
                  Path: "../../../bin/k8s/1.24.2-linux-amd64/etcd",
                  Err: <syscall.Errno>0x2,
              },
          },
      }
  occurred

I think it is because of the envtest configuration which points to the wrong location for the macOS users: https://github.com/devfile/devworkspace-operator/blob/main/controllers/controller/devworkspacerouting/suite_test.go#L89.
The correct location should contain 1.24.2-darwin-amd64 instead.

Describe the solution you'd like

Configure envtest according to the OS on which the tests will run.

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