def test_work_request_commands(self):
     result = util.invoke_command(['os-management', 'work-request', 'list'])
     assert 'Error: Missing option(s)' in result.output
     assert 'compartment-id' in result.output
 def test_container_scan_result_change_compartment_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'container', 'scan', 'result',
         'change-compartment'
     ])
     assert 'Error: Missing option(s) --container-scan-result-id, --compartment-id.' in result.output
 def test_host_port_scan_result_removed(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host-port-scan-result', 'list'])
     assert 'Error: No such command "host-port-scan-result".' in result.output
 def test_container_scan_recipe_update_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'container', 'scan', 'recipe', 'update'
     ])
     assert 'Error: Missing option(s) --container-scan-recipe-id.' in result.output
 def test_container_scan_target_list_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'container', 'scan', 'target', 'list'])
     assert 'Error: Missing option(s) --compartment-id.' in result.output
 def test_host_vulnerability_list_hosts_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'vulnerability',
         'list-impacted-hosts'
     ])
     assert 'Error: Missing option(s) --host-vulnerability-id.' in result.output
 def test_host_vulnerability_export_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host', 'vulnerability', 'export-csv'])
     assert 'Error: Missing option(s) --compartment-id, --time-last-detected-greater-than-or-equal-to, --time-last-detected-less-than-or-equal-to, --file.' in result.output
 def test_host_scan_result_agent_export_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'scan', 'result', 'agent',
         'export-csv'
     ])
     assert 'Error: Missing option(s) --compartment-id, --time-started-after, --time-started-before, --file.' in result.output
 def test_host_scan_result_endpoint_protection_delete_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'scan', 'result',
         'endpoint-protection', 'delete'
     ])
     assert 'Error: Missing option(s) --host-endpoint-protection-scan-result-id.' in result.output
 def test_list_work_request_log_removed(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'work-request-log-entry',
         'list-work-request-logs'
     ])
     assert 'Error: No such command "list-work-request-logs".' in result.output
 def test_host_scan_result_agent_export_verbose_removed(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'scan', 'result', 'agent',
         'export-host-agent-scan-result-csv'
     ])
     assert 'Error: No such command "export-host-agent-scan-result-csv".' in result.output
 def test_host_scan_result_agent_get_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'scan', 'result', 'agent', 'get'
     ])
     assert 'Error: Missing option(s) --host-agent-scan-result-id.' in result.output
Exemple #13
0
    def invoke(self, commands, debug=False, **args):
        if debug is True:
            commands = ['--debug'] + commands

        return util.invoke_command(commands, **args)
 def test_missing_cluster_id(self):
     result = util.invoke_command(['ce', 'cluster', 'generate-token'])
     assert 'Error: Missing option(s) --cluster-id.' in result.output
 def test_host_scan_vulnerability_get_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host', 'vulnerability', 'get'])
     assert 'Error: Missing option(s) --host-vulnerability-id.' in result.output
 def test_host_scan_recipe_create_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host', 'scan', 'recipe', 'create'])
     assert 'Error: Missing option(s) --compartment-id, --port-settings, --agent-settings, --schedule.' in result.output
 def test_host_vulnerability_list_hosts_verbose_removed(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'vulnerability',
         'list-host-vulnerability-impacted-hosts'
     ])
     assert 'Error: No such command "list-host-vulnerability-impacted-hosts".' in result.output
 def test_list_work_request_log_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'work-request-log-entry', 'list'])
     assert 'Error: Missing option(s) --work-request-id.' in result.output
 def test_host_vulnerability_export_verbose_removed(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'vulnerability',
         'export-host-vulnerability-csv'
     ])
     assert 'Error: No such command "export-host-vulnerability-csv".' in result.output
 def test_host_scan_recipe_delete_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host', 'scan', 'recipe', 'delete'])
     assert 'Error: Missing option(s) --host-scan-recipe-id.' in result.output
 def test_container_scan_recipe_create_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'container', 'scan', 'recipe', 'create'
     ])
     assert 'Error: Missing option(s) --compartment-id, --scan-settings.' in result.output
 def test_host_scan_recipe_list_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host', 'scan', 'recipe', 'list'])
     assert 'Error: Missing option(s) --compartment-id.' in result.output
 def test_container_scan_target_create_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'container', 'scan', 'target', 'create'
     ])
     assert 'Error: Missing option(s) --compartment-id, --target-registry, --container-scan-recipe-id.' in result.output
 def test_host_scan_target_change_compartment_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'scan', 'target',
         'change-compartment'
     ])
     assert 'Error: Missing option(s) --host-scan-target-id, --compartment-id.' in result.output
 def test_container_scan_result_removed(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'container-scan-result', 'list'])
     assert 'Error: No such command "container-scan-result".' in result.output
 def test_host_scan_target_update_added(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host', 'scan', 'target', 'update'])
     assert 'Error: Missing option(s) --host-scan-target-id.' in result.output
 def test_host_scan_result_cis_benchmark_change_compartment_added(self):
     result = util.invoke_command([
         'vulnerability-scanning', 'host', 'scan', 'result',
         'cis-benchmark', 'change-compartment'
     ])
     assert 'Error: Missing option(s) --host-cis-benchmark-scan-result-id, --compartment-id.' in result.output
 def test_host_vulnerability_removed(self):
     result = util.invoke_command(
         ['vulnerability-scanning', 'host-vulnerability', 'list'])
     assert 'Error: No such command "host-vulnerability".' in result.output
 def test_marketplace_category(self):
     result = util.invoke_command(
         ['marketplace', 'category', 'list', '--help'])
     assert 'Usage: oci marketplace category list' in result.output
Exemple #30
0
 def test_bds_add_worker_nodes_command(self):
     result = util.invoke_command(['bds', 'instance', 'add'])
     assert 'Error: No such command "add"' in result.output
     result = util.invoke_command(
         ['bds', 'instance', 'worker-nodes', 'add'])
     assert 'Usage: oci bds instance worker-nodes add' in result.output