コード例 #1
0
 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
コード例 #2
0
 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
コード例 #3
0
 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
コード例 #4
0
 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
コード例 #5
0
 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
コード例 #6
0
 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
コード例 #7
0
 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
コード例 #8
0
 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
コード例 #9
0
 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
コード例 #10
0
 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
コード例 #11
0
 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
コード例 #12
0
 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
コード例 #13
0
ファイル: test_audit.py プロジェクト: johgu739/oci-cli
    def invoke(self, commands, debug=False, **args):
        if debug is True:
            commands = ['--debug'] + commands

        return util.invoke_command(commands, **args)
コード例 #14
0
 def test_missing_cluster_id(self):
     result = util.invoke_command(['ce', 'cluster', 'generate-token'])
     assert 'Error: Missing option(s) --cluster-id.' in result.output
コード例 #15
0
 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
コード例 #16
0
 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
コード例 #17
0
 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
コード例 #18
0
 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
コード例 #19
0
 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
コード例 #20
0
 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
コード例 #21
0
 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
コード例 #22
0
 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
コード例 #23
0
 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
コード例 #24
0
 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
コード例 #25
0
 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
コード例 #26
0
 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
コード例 #27
0
 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
コード例 #28
0
 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
コード例 #29
0
 def test_marketplace_category(self):
     result = util.invoke_command(
         ['marketplace', 'category', 'list', '--help'])
     assert 'Usage: oci marketplace category list' in result.output
コード例 #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