|
| 1 | +#!/usr/bin/env python |
| 2 | + |
| 3 | +""" |
| 4 | +Defines all test parameter options for WeaveWdmNext automation. |
| 5 | +""" |
| 6 | + |
| 7 | +# Test Options |
| 8 | +# Client nodes |
| 9 | +CLIENTS = "clients" |
| 10 | +# Whether to use plaid |
| 11 | +PLAID = "plaid" |
| 12 | +# Control test result output |
| 13 | +QUIET = "quiet" |
| 14 | +# Server nodes |
| 15 | +SERVER = "server" |
| 16 | +# Whether to use strace |
| 17 | +STRACE = "strace" |
| 18 | +# Name of test case |
| 19 | +TEST_CASE_NAME = "test_case_name" |
| 20 | +# Time to wait for test end |
| 21 | +TIMEOUT = "timeout" |
| 22 | +# Option for using persistent storage |
| 23 | +USE_PERSISTENT_STORAGE = "use_persistent_storage" |
| 24 | +# Type of weave subscription |
| 25 | +WDM_OPTION = "wdm_option" |
| 26 | +# Tag to denote test type |
| 27 | +TEST_TAG = "test_tag" |
| 28 | + |
| 29 | +""" |
| 30 | +Client/Server SHARED Options |
| 31 | +""" |
| 32 | +# Resets the state of the data sink after each iteration |
| 33 | +CLEAR_STATE_BETWEEN_ITERATIONS = "clear_state_between_iterations" |
| 34 | +# Enable/disable flip trait data in HandleDataFlipTimeout |
| 35 | +ENABLE_FLIP = "enable_flip" |
| 36 | +# Controls whether the process will exit the iteration or not at the end of the iteration |
| 37 | +ENABLE_STOP = "enable_stop" |
| 38 | +# Controls the event generator (None | Debug | Livenesss | Security | Telemetry | TestTrait) |
| 39 | +# running in the node's background. |
| 40 | +EVENT_GENERATOR = "event_generator" |
| 41 | +# Fault injections |
| 42 | +FAULTS = "faults" |
| 43 | +# Control what ends the test iteration |
| 44 | +# 0(client cancel), 1(publisher cancel), 2(client abort), 3(Publisher abort), 4(Idle) |
| 45 | +FINAL_STATUS = "final_status" |
| 46 | +# Period of time (milliseconds) between events |
| 47 | +INTER_EVENT_PERIOD = "inter_event_period" |
| 48 | +# Specify time (seconds) between liveness checks in WDM subscription as publisher |
| 49 | +LIVENESS_CHECK_PERIOD = "wdm_liveness_check_period" |
| 50 | +# Save wdm perf data in files |
| 51 | +SAVE_PERF = "save_perf" |
| 52 | +TAP = "tap_device" |
| 53 | +# Controls which traits are published and subscribed to, values must be same between client/server |
| 54 | +TEST_CASE = "test_case" |
| 55 | +# Period of time (milliseconds) between iterations |
| 56 | +TEST_DELAY = "test_delay" |
| 57 | +# Number of times test sequence is repeated |
| 58 | +TEST_ITERATIONS = "test_iterations" |
| 59 | +# Period of time between trait instance mutations |
| 60 | +TIMER_PERIOD = "timer_period" |
| 61 | +# Number of times the node will mutate the trait instance per iteration |
| 62 | +TOTAL_COUNT = "total_count" |
| 63 | +# Logs to verify on node |
| 64 | +LOG_CHECK = "log_check" |
| 65 | + |
| 66 | +""" |
| 67 | +Client ONLY Options |
| 68 | +""" |
| 69 | +CASE = "case" |
| 70 | +# File containing Weave certificate to authenticate the node |
| 71 | +CASE_CERT_PATH = "node_cert" |
| 72 | +# File containing private key to authenticate the node |
| 73 | +CASE_KEY_PATH = "node_key" |
| 74 | +# Enable/disable dictionary tests |
| 75 | +ENABLE_DICTIONARY_TEST = "enable_dictionary_test" |
| 76 | +# Enable automatic subscription retries by WDM |
| 77 | +ENABLE_RETRY = "enable_retry" |
| 78 | +# Enable mock event initial counter using timestamp |
| 79 | +ENABLE_MOCK_EVENT_TIMESTAMP_INITIAL_COUNTER = "enable_mock_event_timestamp_initial_counter" |
| 80 | +# Use group key to encrypt messages |
| 81 | +GROUP_ENC = "group_enc" |
| 82 | +# Key to encrypt messages |
| 83 | +GROUP_ENC_KEY_ID = "group_enc_key_id" |
| 84 | +# The conditionality of the update (conditional | unconditional | mixed | alternate) |
| 85 | +UPDATE_CONDITIONALITY = "wdm_update_conditionality" |
| 86 | +# Client discards the paths on which SetUpdated was called in case of error |
| 87 | +UPDATE_DISCARD_ERROR = "wdm_update_discard_on_error" |
| 88 | +# The first mutation to apply to each trait instance |
| 89 | +UPDATE_MUTATION = "wdm_update_mutation" |
| 90 | +# Number of mutations performed in same context |
| 91 | +UPDATE_NUM_MUTATIONS = "wdm_update_number_of_mutations" |
| 92 | +# How many times same mutation is applied before moving on |
| 93 | +UPDATE_NUM_REPEATED_MUTATIONS = "wdm_update_number_of_repeated_mutations" |
| 94 | +# Number of traits to mutate (1-4) |
| 95 | +UPDATE_NUM_TRAITS = "wdm_update_number_of_traits" |
| 96 | +# Controls when first mutation is applied and flushed |
| 97 | +UPDATE_TIMING = "wdm_update_timing" |
| 98 | + |
| 99 | + |
| 100 | +""" |
| 101 | +Server ONLY Options |
| 102 | +""" |
| 103 | +# Node ID of the destination node |
| 104 | +WDM_SUBLESS_NOTIFY_DEST_NODE = "wdm_subless_notify_dest_node" |
| 105 | + |
| 106 | +# Options top level keys |
| 107 | +CLIENT = "client_options" |
| 108 | +SERVER = "server_options" |
| 109 | +TEST = "test_options" |
| 110 | + |
| 111 | +OPTIONS = { |
| 112 | + CLIENT: { |
| 113 | + CASE: False, |
| 114 | + CASE_CERT_PATH: None, |
| 115 | + CASE_KEY_PATH: None, |
| 116 | + CLEAR_STATE_BETWEEN_ITERATIONS: False, |
| 117 | + ENABLE_DICTIONARY_TEST: True, |
| 118 | + ENABLE_FLIP: None, |
| 119 | + ENABLE_RETRY: False, |
| 120 | + ENABLE_STOP: True, |
| 121 | + ENABLE_MOCK_EVENT_TIMESTAMP_INITIAL_COUNTER: True, |
| 122 | + EVENT_GENERATOR: None, |
| 123 | + FAULTS: None, |
| 124 | + FINAL_STATUS: None, |
| 125 | + GROUP_ENC: False, |
| 126 | + GROUP_ENC_KEY_ID: None, |
| 127 | + INTER_EVENT_PERIOD: None, |
| 128 | + LIVENESS_CHECK_PERIOD: None, |
| 129 | + SAVE_PERF: False, |
| 130 | + TAP: None, |
| 131 | + TEST_CASE: 1, |
| 132 | + TEST_DELAY: None, |
| 133 | + TEST_ITERATIONS: None, |
| 134 | + TIMER_PERIOD: None, |
| 135 | + TOTAL_COUNT: None, |
| 136 | + UPDATE_CONDITIONALITY: None, |
| 137 | + UPDATE_DISCARD_ERROR: False, |
| 138 | + UPDATE_MUTATION: None, |
| 139 | + UPDATE_NUM_MUTATIONS: None, |
| 140 | + UPDATE_NUM_REPEATED_MUTATIONS: None, |
| 141 | + UPDATE_NUM_TRAITS: None, |
| 142 | + UPDATE_TIMING: None, |
| 143 | + LOG_CHECK: [] |
| 144 | + }, |
| 145 | + SERVER: { |
| 146 | + CLEAR_STATE_BETWEEN_ITERATIONS: False, |
| 147 | + ENABLE_FLIP: None, |
| 148 | + ENABLE_STOP: False, |
| 149 | + EVENT_GENERATOR: None, |
| 150 | + FAULTS: None, |
| 151 | + FINAL_STATUS: None, |
| 152 | + INTER_EVENT_PERIOD: None, |
| 153 | + LIVENESS_CHECK_PERIOD: None, |
| 154 | + SAVE_PERF: False, |
| 155 | + TAP: None, |
| 156 | + TEST_CASE: 1, |
| 157 | + TEST_DELAY: 0, |
| 158 | + TEST_ITERATIONS: None, |
| 159 | + TIMER_PERIOD: None, |
| 160 | + TOTAL_COUNT: None, |
| 161 | + WDM_SUBLESS_NOTIFY_DEST_NODE: None, |
| 162 | + LOG_CHECK: [] |
| 163 | + }, |
| 164 | + TEST: { |
| 165 | + CLIENTS: None, |
| 166 | + PLAID: "auto", |
| 167 | + QUIET: True, |
| 168 | + SERVER: None, |
| 169 | + STRACE: False, |
| 170 | + TEST_CASE_NAME: [], |
| 171 | + TIMEOUT: 60 * 15, |
| 172 | + WDM_OPTION: None, |
| 173 | + USE_PERSISTENT_STORAGE: True, |
| 174 | + TEST_TAG: None |
| 175 | + } |
| 176 | +} |
0 commit comments