{"action":"created","issue":{"url":"https://api.github.com/repos/chef/inspec/issues/2895","repository_url":"https://api.github.com/repos/chef/inspec","labels_url":"https://api.github.com/repos/chef/inspec/issues/2895/labels{/name}","comments_url":"https://api.github.com/repos/chef/inspec/issues/2895/comments","events_url":"https://api.github.com/repos/chef/inspec/issues/2895/events","html_url":"https://github.com/chef/inspec/issues/2895","id":309493175,"number":2895,"title":"inspec check PATH ","user":{"login":"ibata","id":673807,"avatar_url":"https://avatars1.githubusercontent.com/u/673807?v=4","gravatar_id":"","url":"https://api.github.com/users/ibata","html_url":"https://github.com/ibata","followers_url":"https://api.github.com/users/ibata/followers","following_url":"https://api.github.com/users/ibata/following{/other_user}","gists_url":"https://api.github.com/users/ibata/gists{/gist_id}","starred_url":"https://api.github.com/users/ibata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibata/subscriptions","organizations_url":"https://api.github.com/users/ibata/orgs","repos_url":"https://api.github.com/users/ibata/repos","events_url":"https://api.github.com/users/ibata/events{/privacy}","received_events_url":"https://api.github.com/users/ibata/received_events","type":"User","site_admin":false},"labels":[{"id":253920988,"url":"https://api.github.com/repos/chef/inspec/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-28T19:08:15Z","updated_at":"2018-04-06T20:47:53Z","closed_at":null,"author_association":"NONE","body":"what's the best way  to unit testing my inspect tests\r\ni'm using \"inspec check url\" \r\n\r\n\r\nmy test located under: test/integration/ktf_suite/controls/reach_host.rb:\r\n```ruby\r\ncontrol 'reach_host' do\r\n  impact 1.0\r\n  title 'This is Testing Endpoint'\r\n  describe http(\"url\", ssl_verify: false) do\r\n    its('status') { should eq 200 }\r\n    its('body') { should cmp %r{<h3>some content</h3>} }\r\n  end\r\nend\r\n```\r\n\r\n```bash\r\n$ inspec --help\r\nCommands:\r\n  inspec archive PATH                # archive a profile to tar.gz (default) ...\r\n  inspec check PATH                  # verify all tests at the specified PATH\r\n  inspec compliance SUBCOMMAND ...   # Chef Compliance commands\r\n  inspec detect                      # detect the target OS\r\n  inspec exec PATH(S)                # run all test files at the specified PATH.\r\n  inspec help [COMMAND]              # Describe available commands or one spe...\r\n  inspec init TEMPLATE ...           # Scaffolds a new project\r\n  inspec json PATH                   # read all tests in PATH and generate a ...\r\n  inspec shell                       # open an interactive debugging shell\r\n  inspec supermarket SUBCOMMAND ...  # Supermarket commands\r\n  inspec version                     # prints the version of this tool\r\n\r\nOptions:\r\n  [--diagnose], [--no-diagnose]  # Show diagnostics (versions, configurations)\r\n```"},"comment":{"url":"https://api.github.com/repos/chef/inspec/issues/comments/379372685","html_url":"https://github.com/chef/inspec/issues/2895#issuecomment-379372685","issue_url":"https://api.github.com/repos/chef/inspec/issues/2895","id":379372685,"user":{"login":"clintoncwolfe","id":156460,"avatar_url":"https://avatars3.githubusercontent.com/u/156460?v=4","gravatar_id":"","url":"https://api.github.com/users/clintoncwolfe","html_url":"https://github.com/clintoncwolfe","followers_url":"https://api.github.com/users/clintoncwolfe/followers","following_url":"https://api.github.com/users/clintoncwolfe/following{/other_user}","gists_url":"https://api.github.com/users/clintoncwolfe/gists{/gist_id}","starred_url":"https://api.github.com/users/clintoncwolfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintoncwolfe/subscriptions","organizations_url":"https://api.github.com/users/clintoncwolfe/orgs","repos_url":"https://api.github.com/users/clintoncwolfe/repos","events_url":"https://api.github.com/users/clintoncwolfe/events{/privacy}","received_events_url":"https://api.github.com/users/clintoncwolfe/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T20:47:53Z","updated_at":"2018-04-06T20:47:53Z","author_association":"CONTRIBUTOR","body":"[`inspec check`](https://www.inspec.io/docs/reference/cli/#check) performs a validity check on the code you provide.  It checks for common problems, and _avoids_ running your tests.  That's probably not what you want when doing profile development.\r\n\r\nYou are likely looking for [`inspec exec`](https://www.inspec.io/docs/reference/cli/#exec), which actually does run your tests.  You can use the `-t` option to select what to run it against, such as a docker container or an ec2 instance, that you have spun up for testing."}}
{"actor":{"display_login":"clintoncwolfe"}}