This repository was archived by the owner on Dec 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
Feature/wdm next refactor #341
Open
allenshihgoog
wants to merge
9
commits into
openweave:master
Choose a base branch
from
allenshihgoog:feature/wdmNextRefactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e283026
wdmNext automation refactor improvements
8c3d10c
fix absolute path of json param file
a233307
experiment with grouping testcases and using dynamic testcase generation
40355e0
push Makefile.in changes
2d59794
remove test grouping as it is slower without plaid in presubmit
f1b8750
rebase from master
772a53e
apply refactoring to wdm service tests
allenshihgoog 4af608e
fix service test tag name
allenshihgoog ea7b7bc
fix test_tag and add comment
allenshihgoog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
177 changes: 177 additions & 0 deletions
177
src/test-apps/happy/test-templates/WeaveWdmNextOptions.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,177 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| """ | ||
| Defines all test parameter options for WeaveWdmNext automation. | ||
| Client and Server options map to MockWdmNode CLI options. | ||
| """ | ||
|
|
||
| # Test Options | ||
| # Client nodes | ||
| CLIENTS = "clients" | ||
| # Whether to use plaid | ||
| PLAID = "plaid" | ||
| # Control test result output | ||
| QUIET = "quiet" | ||
| # Server nodes | ||
| SERVER = "server" | ||
| # Whether to use strace | ||
| STRACE = "strace" | ||
| # Name of test case | ||
| TEST_CASE_NAME = "test_case_name" | ||
| # Time to wait for test end | ||
| TIMEOUT = "timeout" | ||
| # Option for using persistent storage | ||
| USE_PERSISTENT_STORAGE = "use_persistent_storage" | ||
| # Type of weave subscription | ||
| WDM_OPTION = "wdm_option" | ||
| # Tag to denote test type | ||
| TEST_TAG = "test_tag" | ||
|
|
||
| """ | ||
| Client/Server SHARED Options | ||
| """ | ||
| # Resets the state of the data sink after each iteration | ||
| CLEAR_STATE_BETWEEN_ITERATIONS = "clear_state_between_iterations" | ||
| # Enable/disable flip trait data in HandleDataFlipTimeout | ||
| ENABLE_FLIP = "enable_flip" | ||
| # Controls whether the process will exit the iteration or not at the end of the iteration | ||
| ENABLE_STOP = "enable_stop" | ||
| # Controls the event generator (None | Debug | Livenesss | Security | Telemetry | TestTrait) | ||
| # running in the node's background. | ||
| EVENT_GENERATOR = "event_generator" | ||
| # Fault injections | ||
| FAULTS = "faults" | ||
| # Control what ends the test iteration | ||
| # 0(client cancel), 1(publisher cancel), 2(client abort), 3(Publisher abort), 4(Idle) | ||
| FINAL_STATUS = "final_status" | ||
| # Period of time (milliseconds) between events | ||
| INTER_EVENT_PERIOD = "inter_event_period" | ||
| # Specify time (seconds) between liveness checks in WDM subscription as publisher | ||
| LIVENESS_CHECK_PERIOD = "wdm_liveness_check_period" | ||
allenshihgoog marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Save wdm perf data in files | ||
| SAVE_PERF = "save_perf" | ||
| TAP = "tap_device" | ||
| # Controls which traits are published and subscribed to, values must be same between client/server | ||
| TEST_CASE = "test_case" | ||
| # Period of time (milliseconds) between iterations | ||
| TEST_DELAY = "test_delay" | ||
| # Number of times test sequence is repeated | ||
| TEST_ITERATIONS = "test_iterations" | ||
| # Period of time between trait instance mutations | ||
| TIMER_PERIOD = "timer_period" | ||
| # Number of times the node will mutate the trait instance per iteration | ||
| TOTAL_COUNT = "total_count" | ||
| # Logs to verify on node | ||
| LOG_CHECK = "log_check" | ||
|
|
||
| """ | ||
| Client ONLY Options | ||
| """ | ||
| CASE = "case" | ||
| # File containing Weave certificate to authenticate the node | ||
| CASE_CERT_PATH = "node_cert" | ||
| # File containing private key to authenticate the node | ||
| CASE_KEY_PATH = "node_key" | ||
| # Enable/disable dictionary tests | ||
| ENABLE_DICTIONARY_TEST = "enable_dictionary_test" | ||
| # Enable automatic subscription retries by WDM | ||
| ENABLE_RETRY = "enable_retry" | ||
| # Enable mock event initial counter using timestamp | ||
| ENABLE_MOCK_EVENT_TIMESTAMP_INITIAL_COUNTER = "enable_mock_event_timestamp_initial_counter" | ||
| # Use group key to encrypt messages | ||
| GROUP_ENC = "group_enc" | ||
| # Key to encrypt messages | ||
| GROUP_ENC_KEY_ID = "group_enc_key_id" | ||
| # The conditionality of the update (conditional | unconditional | mixed | alternate) | ||
| UPDATE_CONDITIONALITY = "wdm_update_conditionality" | ||
| # Client discards the paths on which SetUpdated was called in case of error | ||
| UPDATE_DISCARD_ERROR = "wdm_update_discard_on_error" | ||
| # The first mutation to apply to each trait instance | ||
| UPDATE_MUTATION = "wdm_update_mutation" | ||
| # Number of mutations performed in same context | ||
| UPDATE_NUM_MUTATIONS = "wdm_update_number_of_mutations" | ||
| # How many times same mutation is applied before moving on | ||
| UPDATE_NUM_REPEATED_MUTATIONS = "wdm_update_number_of_repeated_mutations" | ||
| # Number of traits to mutate (1-4) | ||
| UPDATE_NUM_TRAITS = "wdm_update_number_of_traits" | ||
| # Controls when first mutation is applied and flushed | ||
| UPDATE_TIMING = "wdm_update_timing" | ||
|
|
||
|
|
||
| """ | ||
| Server ONLY Options | ||
| """ | ||
| # Node ID of the destination node | ||
| WDM_SUBLESS_NOTIFY_DEST_NODE = "wdm_subless_notify_dest_node" | ||
|
|
||
| # Options top level keys | ||
| CLIENT = "client_options" | ||
| SERVER = "server_options" | ||
| TEST = "test_options" | ||
|
|
||
| OPTIONS = { | ||
| CLIENT: { | ||
| CASE: False, | ||
| CASE_CERT_PATH: None, | ||
| CASE_KEY_PATH: None, | ||
| CLEAR_STATE_BETWEEN_ITERATIONS: False, | ||
| ENABLE_DICTIONARY_TEST: True, | ||
| ENABLE_FLIP: None, | ||
| ENABLE_RETRY: False, | ||
| ENABLE_STOP: True, | ||
| ENABLE_MOCK_EVENT_TIMESTAMP_INITIAL_COUNTER: True, | ||
| EVENT_GENERATOR: None, | ||
| FAULTS: None, | ||
| FINAL_STATUS: None, | ||
| GROUP_ENC: False, | ||
| GROUP_ENC_KEY_ID: None, | ||
| INTER_EVENT_PERIOD: None, | ||
| LIVENESS_CHECK_PERIOD: None, | ||
| SAVE_PERF: False, | ||
| TAP: None, | ||
| TEST_CASE: 1, | ||
| TEST_DELAY: None, | ||
| TEST_ITERATIONS: None, | ||
| TIMER_PERIOD: None, | ||
| TOTAL_COUNT: None, | ||
| UPDATE_CONDITIONALITY: None, | ||
| UPDATE_DISCARD_ERROR: False, | ||
| UPDATE_MUTATION: None, | ||
| UPDATE_NUM_MUTATIONS: None, | ||
| UPDATE_NUM_REPEATED_MUTATIONS: None, | ||
| UPDATE_NUM_TRAITS: None, | ||
| UPDATE_TIMING: None, | ||
| LOG_CHECK: [] | ||
| }, | ||
| SERVER: { | ||
| CLEAR_STATE_BETWEEN_ITERATIONS: False, | ||
| ENABLE_FLIP: None, | ||
| ENABLE_STOP: False, | ||
| EVENT_GENERATOR: None, | ||
| FAULTS: None, | ||
| FINAL_STATUS: None, | ||
| INTER_EVENT_PERIOD: None, | ||
| LIVENESS_CHECK_PERIOD: None, | ||
| SAVE_PERF: False, | ||
| TAP: None, | ||
| TEST_CASE: 1, | ||
| TEST_DELAY: 0, | ||
| TEST_ITERATIONS: None, | ||
| TIMER_PERIOD: None, | ||
| TOTAL_COUNT: None, | ||
| WDM_SUBLESS_NOTIFY_DEST_NODE: None, | ||
| LOG_CHECK: [] | ||
| }, | ||
| TEST: { | ||
| CLIENTS: None, | ||
| PLAID: "auto", | ||
| QUIET: True, | ||
| SERVER: None, | ||
| STRACE: False, | ||
| TEST_CASE_NAME: [], | ||
| TIMEOUT: 60 * 15, | ||
| WDM_OPTION: None, | ||
| USE_PERSISTENT_STORAGE: True, | ||
| TEST_TAG: None | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.