ottomatica / opunit

🕵️‍♂️ Sanity checking containers, vms, and servers
Apache License 2.0
175 stars 8 forks source link

Error: Cannot find module './command' when command check #342

Closed billmetangmo closed 3 years ago

billmetangmo commented 3 years ago

I found this project from an article on https://link.springer.com/chapter/10.1007/978-3-030-39306-9_12 and found it very instresrting :) . So I decided to use it to verify requirements steps of one project . It works like a charm except the command excec. Here's the bug details:

Describe the bug I wanted to execute an opunit verify with local connector using command check but it fails.

To Reproduce Steps to reproduce the behavior:

  1. Use the opunit.yml below:
    
    - group:
    description: "Installation check"
    checks:
      - version:
         cmd: git --version
         range: ^2.x.x
      - version:
          cmd: make --version
          range: ^4.1
      - version:
          cmd: python --version
          range: ^3.7.3
      - version:
          cmd: direnv --version
          range: ^2.22.0
      - version:
          cmd: terraform --version
          range: ^0.13.2
      - version:
          cmd: netcat -h
          range: ^x.x
      - version:
          cmd: docker version
          range: ^x.x
  1. Run opunit verify , you will get this error

Error: Cannot find module './command' Require stack:


**Expected behavior**
Should print FOO in console

**Please complete the following information:**
 - OS ( WSL2 windows) : 

Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic


 - NodeJS ( output of nvm ls)

-> v14.14.0 default -> node (-> v14.14.0) node -> stable (-> v14.14.0) (default) stable -> 14.14 (-> v14.14.0) (default) iojs -> N/A (default) unstable -> N/A (default) lts/* -> lts/erbium (-> N/A) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.17.1 (-> N/A) lts/carbon -> v8.17.0 (-> N/A) lts/dubnium -> v10.22.1 (-> N/A) lts/erbium -> v12.19.0 (-> N/A)



Thanks
chrisparnin commented 3 years ago

My guess is that this is only available in the dev branch: https://github.com/ottomatica/opunit/tree/dev

@ssmirr Can do a quick check, and maybe we can merge into master soon.

ssmirr commented 3 years ago

just merged dev to master and the command check should now be available. Could you try again @billmetangmo?

billmetangmo commented 3 years ago

Thanks @ssmirr . It works now :) !

chrisparnin commented 3 years ago

Super! Closing issue. Let us know about any other things issues you run into or features that might be helpful.