-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MG test to test the flag change in setup connection
- Loading branch information
1 parent
5e5a07c
commit b463fb3
Showing
4 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
38 changes: 38 additions & 0 deletions
38
test/message-generator/mock/job-declarator-mock-invalid-flag.json
This file contains 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,38 @@ | ||
{ | ||
"version": "2", | ||
"doc": [ | ||
"This test does", | ||
"Soft mock of JD", | ||
"Connect to JDS", | ||
"Receive Setup Connection Error as incorrect bits are set" | ||
], | ||
"frame_builders": [ | ||
{ | ||
"type": "automatic", | ||
"message_id": "test/message-generator/messages/common_messages.json::setup_connection_job_declarator_with_no_async_flag" | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"message_ids": ["setup_connection_job_declarator_with_no_async_flag"], | ||
"role": "client", | ||
"results": [ | ||
{ | ||
"type": "match_message_type", | ||
"value": "0x01" | ||
} | ||
|
||
], | ||
"actiondoc": "This action sends SetupConnection and checks that .Success" | ||
} | ||
], | ||
"setup_commands": [], | ||
"execution_commands": [], | ||
"cleanup_commands": [], | ||
"role": "client", | ||
"downstream": { | ||
"ip": "127.0.0.1", | ||
"port": 34264, | ||
"pub_key": "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
test/message-generator/test/job-declarator-flag-test/job-declarator-flag-test.json
This file contains 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,71 @@ | ||
{ | ||
"version": "2", | ||
"doc": [ | ||
"This test does", | ||
"Launch the jd-server" | ||
], | ||
"frame_builders": [ | ||
], | ||
"actions": [ | ||
], | ||
"setup_commands": [ | ||
{ | ||
"command": "cargo", | ||
"args": [ | ||
"llvm-cov", | ||
"--no-report", | ||
"run", | ||
"-p", | ||
"jd_server", | ||
"--", | ||
"-c", | ||
"../test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml" | ||
], | ||
"conditions": { | ||
"WithConditions": { | ||
"conditions": [ | ||
{ | ||
"output_string": "JD INITIALIZED", | ||
"output_location": "StdOut", | ||
"late_condition": false, | ||
"condition": true | ||
} | ||
], | ||
"timer_secs": 300, | ||
"warn_no_panic": false | ||
} | ||
} | ||
}, | ||
{ | ||
"command": "cargo", | ||
"args": [ | ||
"run", | ||
"../../test/message-generator/mock/job-declarator-mock-invalid-flag.json" | ||
], | ||
"conditions": { | ||
"WithConditions": { | ||
"conditions": [ | ||
{ | ||
"output_string": "MATCHED MESSAGE TYPE 1", | ||
"output_location": "StdOut", | ||
"late_condition": false, | ||
"condition": true | ||
} | ||
], | ||
"timer_secs": 600, | ||
"warn_no_panic": false | ||
} | ||
} | ||
} | ||
], | ||
"execution_commands": [ | ||
], | ||
"cleanup_commands": [ | ||
{ | ||
"command": "pkill", | ||
"args": ["-f", "jd_server", "-SIGINT"], | ||
"conditions": "None" | ||
} | ||
], | ||
"role": "none" | ||
} |
9 changes: 9 additions & 0 deletions
9
test/message-generator/test/job-declarator-flag-test/job-declarator-flag-test.sh
This file contains 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,9 @@ | ||
cd roles | ||
cargo llvm-cov --no-report -p pool_sv2 | ||
|
||
cd ../utils/message-generator/ | ||
cargo build | ||
|
||
RUST_LOG=debug cargo run ../../test/message-generator/test/job-declarator-flag-test/job-declarator-flag-test.json || { echo 'mg test failed' ; exit 1; } | ||
|
||
sleep 10 |