qubesadmin.tests.tools package

Submodules

qubesadmin.tests.tools.init module

class qubesadmin.tests.tools.init.TC_00_PropertyAction(methodName='runTest')[source]

Bases: QubesTestCase

test_000_default()[source]
test_001_set_prop()[source]
test_002_set_prop_2()[source]
test_003_set_prop_override_default()[source]
test_003_set_prop_with_default()[source]
class qubesadmin.tests.tools.init.TC_01_SinglePropertyAction(methodName='runTest')[source]

Bases: QubesTestCase

test_000_help()[source]
test_001_help_const()[source]
test_100_default()[source]
test_101_set_prop()[source]
test_102_set_prop_dest()[source]
test_103_set_prop_const()[source]
test_104_set_prop_positional()[source]

qubesadmin.tests.tools.qubes_prefs module

class qubesadmin.tests.tools.qubes_prefs.TC_00_qubes_prefs(methodName='runTest')[source]

Bases: QubesTestCase

test_000_list()[source]
test_002_set_property()[source]
test_003_invalid_property()[source]
test_004_set_invalid_property()[source]

qubesadmin.tests.tools.qvm_backup module

qubesadmin.tests.tools.qvm_backup_restore module

qubesadmin.tests.tools.qvm_check module

qubesadmin.tests.tools.qvm_clone module

qubesadmin.tests.tools.qvm_create module

qubesadmin.tests.tools.qvm_device module

Tests for the qvm-device tool.

class qubesadmin.tests.tools.qvm_device.TC_00_qvm_device(methodName='runTest')[source]

Bases: QubesTestCase

Tests the output logic of the qvm-device tool

expected_device_call(vm, action, returned=b'0\x00', klass='testclass')[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_000_list_all()[source]

List all exposed vm devices. No devices are connected to other domains.

test_001_list_assigned_required()[source]

List the device exposed by the vm1 and assigned to the vm3.

test_002_list_attach()[source]

List the device exposed by the vm1 and attached to the vm3.

test_003_list_device_classes()[source]

List the device exposed by the vm1 and attached to the vm3.

test_004_list_pci_with_sbdf()[source]

List PCI devices with SBDF info.

test_010_attach()[source]

Test attach action

test_011_attach_options()[source]

Test read-only attach option

test_012_attach_invalid()[source]

Test attach action

test_013_attach_invalid_device()[source]

Test attach action

test_014_attach_invalid_backend()[source]

Test attach action

test_020_detach()[source]

Test detach action

test_021_detach_unknown()[source]

Test detach action

test_022_detach_all()[source]

Test detach action

test_030_assign()[source]

Test assign action

test_031_assign_required()[source]

Test assign as required

test_032_assign_ask_and_options()[source]

Test read-only assign option

test_033_assign_invalid()[source]

Test attach action

test_034_assign_invalid_device()[source]

Test attach action

test_035_assign_invalid_backend()[source]

Test attach action

test_036_assign_port()[source]

Test assign action

test_037_assign_port_asterisk()[source]

Test assign action

test_038_assign_device_from_port()[source]

Test assign action

test_039_assign_explicit_device()[source]

Test assign action

test_040_assign_explicit_device_device_id()[source]

Test assign action

test_041_assign_denied_device(_mock_deny_list)[source]

Test user warning

test_050_unassign()[source]

Test unassign action

test_051_unassign_unknown()[source]

Test unassign action

test_052_unassign_port()[source]

Test unassign action

test_053_unassign_device_from_port()[source]

Test unassign action

test_054_unassign_explicit_device()[source]

Test unassign action

test_055_unassign_explicit_device_port()[source]

Test unassign action

test_056_unassign_explicit_device_id()[source]

Test unassign action

test_057_unassign_all()[source]

Test unassign action

test_060_device_info()[source]

Test printing info about device

qubesadmin.tests.tools.qvm_features module

qubesadmin.tests.tools.qvm_firewall module

qubesadmin.tests.tools.qvm_kill module

qubesadmin.tests.tools.qvm_ls module

class qubesadmin.tests.tools.qvm_ls.TC_00_Column(methodName='runTest')[source]

Bases: QubesTestCase

test_100_init()[source]
class qubesadmin.tests.tools.qvm_ls.TC_100_Sort(methodName='runTest')[source]

Bases: QubesTestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_101_sort_string()[source]
test_102_sort_numeric()[source]
class qubesadmin.tests.tools.qvm_ls.TC_10_globals(methodName='runTest')[source]

Bases: QubesTestCase

test_100_simple_flag()[source]
test_900_formats_columns()[source]
class qubesadmin.tests.tools.qvm_ls.TC_110_Filtering(methodName='runTest')[source]

Bases: QubesTestCase

test_111_filter_class()[source]
test_112_filter_label()[source]
test_113_filter_template_source()[source]
test_114_filter_netvm_is()[source]
test_115_internal_servicevm_pending_updates()[source]
test_116_features()[source]
test_117_preferences()[source]
class qubesadmin.tests.tools.qvm_ls.TC_50_List(methodName='runTest')[source]

Bases: QubesTestCase

test_100_list_with_status()[source]
test_101_list_with_underscore()[source]
test_102_list_selected()[source]
test_102_raw_list()[source]
test_103_list_all()[source]
test_104_wildcards()[source]
test_110_network_tree()[source]
class qubesadmin.tests.tools.qvm_ls.TC_70_Tags(methodName='runTest')[source]

Bases: QubesTestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_100_exclude_tag()[source]
test_100_tag()[source]
test_100_tag_nomatch()[source]
test_100_tags()[source]
test_100_tags_nomatch()[source]
class qubesadmin.tests.tools.qvm_ls.TC_80_Power_state_filters(methodName='runTest')[source]

Bases: QubesTestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_100_nofilter()[source]
test_100_running()[source]
test_100_running_or_halted()[source]
class qubesadmin.tests.tools.qvm_ls.TC_90_List_with_qubesd_calls(methodName='runTest')[source]

Bases: QubesTestCase

test_100_list_with_status()[source]
test_101_list_selected()[source]
class qubesadmin.tests.tools.qvm_ls.TestApp[source]

Bases: object

qubesadmin.tests.tools.qvm_pause module

qubesadmin.tests.tools.qvm_pool module

class qubesadmin.tests.tools.qvm_pool.TC_00_qvm_pool(methodName='runTest')[source]

Bases: QubesTestCase

test_000_list()[source]
test_010_drivers()[source]
test_020_add()[source]
test_021_add_multiple()[source]
test_030_remove()[source]
test_031_remove_multiple()[source]
test_040_info()[source]
test_050_set()[source]
test_051_set_invalid()[source]

qubesadmin.tests.tools.qvm_prefs module

class qubesadmin.tests.tools.qvm_prefs.TC_00_qvm_prefs(methodName='runTest')[source]

Bases: QubesTestCase

test_000_list()[source]
test_001_no_vm()[source]
test_002_set_property()[source]
test_003_invalid_property()[source]
test_004_set_invalid_property()[source]
test_005_get_str()[source]
test_006_get_vm()[source]
test_007_get_vm_none()[source]
test_008_set_vm_prop_none()[source]
test_009_hide_default()[source]

qubesadmin.tests.tools.qvm_remove module

qubesadmin.tests.tools.qvm_run module

qubesadmin.tests.tools.qvm_service module

qubesadmin.tests.tools.qvm_shutdown module

qubesadmin.tests.tools.qvm_start module

qubesadmin.tests.tools.qvm_start_daemon module

qubesadmin.tests.tools.qvm_tags module

class qubesadmin.tests.tools.qvm_tags.TC_00_qvm_tags(methodName='runTest')[source]

Bases: QubesTestCase

test_000_list()[source]
test_001_list_action()[source]
test_002_list_alias()[source]
test_003_list_check()[source]
test_004_list_check_missing()[source]
test_005_list_empty()[source]
test_010_add()[source]
test_020_del()[source]

qubesadmin.tests.tools.qvm_template_postprocess module

qubesadmin.tests.tools.qvm_unpause module

qubesadmin.tests.tools.qvm_volume module

class qubesadmin.tests.tools.qvm_volume.TC_00_qvm_volume(methodName='runTest')[source]

Bases: QubesTestCase

setup_expected_calls_for_list(vms=('vm1', 'sys-net'))[source]
test_000_list()[source]
test_001_list_domain()[source]
test_002_list_domain_pool()[source]
test_003_list_pool()[source]
test_004_list_multiple_domains()[source]
test_005_list_default_action()[source]
test_010_extend()[source]
test_011_extend_error()[source]
test_012_extend_deny_shrink()[source]
test_013_resize_force_shrink()[source]
test_020_revert()[source]
test_021_revert_error()[source]
test_022_revert_no_snapshots()[source]
test_023_revert_specific()[source]
test_030_set_revisions_to_keep()[source]
test_031_set_rw()[source]
test_032_set_invalid()[source]
test_033_set_ephemeral()[source]
test_040_info()[source]
test_041_info_no_revisions()[source]
test_042_info_single_prop()[source]
test_043_info_revisions_only()[source]
test_044_info_no_ephemeral()[source]
test_050_import_file()[source]
test_051_import_stdin()[source]
test_052_import_file_size()[source]
test_053_import_file_matching_size()[source]
test_053_import_file_noresize()[source]

Module contents

class qubesadmin.tests.tools.MockEventsReader(events, delay=0.05)[source]

Bases: object

at_eof()[source]
async readuntil(delim)[source]
class qubesadmin.tests.tools.StderrBuffer[source]

Bases: object

class qubesadmin.tests.tools.StdoutBuffer[source]

Bases: object