Method: PluginManagerCliInstall#test_fail_install_from_path_when_the_dir_structure_is_wrong

Defined in:
lib/plugins/inspec-plugin-manager-cli/test/functional/inspec-plugin_test.rb

#test_fail_install_from_path_when_the_dir_structure_is_wrongObject



387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'lib/plugins/inspec-plugin-manager-cli/test/functional/inspec-plugin_test.rb', line 387

def test_fail_install_from_path_when_the_dir_structure_is_wrong
  bad_path = File.join(project_fixtures_path, "plugins", "inspec-wrong-structure")
  install_result = run_inspec_process_with_this_plugin("plugin install #{bad_path}")

  assert_empty install_result.stderr
  assert_equal 1, install_result.exit_status, "Exit status should be 1"

  error_message = install_result.stdout.split("\n").last
  assert_includes error_message, "Unrecognizable plugin structure"
  assert_includes error_message, "inspec-wrong-structure"
  assert_includes error_message, " When installing from a path, please provide the path of the entry point file"
  assert_includes error_message, "installation failed"
end