[cdc_stream] Add integration tests (#44)

This CL adds Python integration tests for cdc_stream. To run the
tests, you need to supply a Linux host and proper configuration for
cdc_stream to work:

set CDC_SSH_COMMAND=C:\path\to\ssh.exe <args>
set CDC_SCP_COMMAND=C:\path\to\scp.exe <args>
C:\python38\python.exe -m integration_tests.cdc_stream.all_tests --binary_path=C:\full\path\to\cdc_stream.exe --user_host=user@host

Ran the tests and made sure they worked.
This commit is contained in:
Lutz Justen
2022-12-08 15:12:14 +01:00
committed by GitHub
parent 668c2ca8df
commit f0ef34db2f
10 changed files with 1357 additions and 21 deletions
+5 -5
View File
@@ -27,7 +27,7 @@ from integration_tests.framework import test_runner
class Flags(object):
binary_path = None
user_host = None
ssh_port = 22
service_port = 0
def main():
@@ -35,17 +35,17 @@ def main():
parser.add_argument('--binary_path', help='Target [user@]host', required=True)
parser.add_argument('--user_host', help='Target [user@]host', required=True)
parser.add_argument(
'--ssh_port',
'--service_port',
type=int,
help='SSH port for connecting to the host',
default=22)
help='Asset streaming service port',
default=44432)
parser.add_argument('--log_file', help='Log file path')
# Capture all remaining arguments to pass to unittest.main().
args, unittest_args = parser.parse_known_args()
Flags.binary_path = args.binary_path
Flags.user_host = args.user_host
Flags.ssh_port = args.ssh_port
Flags.service_port = args.service_port
# Log to STDERR
log_format = ('%(levelname)-8s%(asctime)s '