|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2025 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | +from itf.plugins.com.ping import ping |
| 14 | +from itf.plugins.com.ssh import execute_command_output |
| 15 | +import logging |
| 16 | + |
| 17 | +logger = logging.getLogger(__name__) |
| 18 | + |
| 19 | + |
| 20 | +def test_persistency_test_app_is_deployed(target_fixture): |
| 21 | + with target_fixture.sut.ssh() as ssh: |
| 22 | + exit_code, stdout, stderr = execute_command_output( |
| 23 | + ssh, "test -f cpp_tests_persistency" |
| 24 | + ) |
| 25 | + assert exit_code == 0, "SSH command failed" |
| 26 | + |
| 27 | +def test_persistency_test_app_is_running(target_fixture): |
| 28 | + with target_fixture.sut.ssh() as ssh: |
| 29 | + exit_code, stdout, stderr = execute_command_output( |
| 30 | + ssh, "./cpp_tests_persistency --name basic.basic --input '{\"kvs_parameters\":{\"instance_id\":0}}'", |
| 31 | + timeout = 30, max_exec_time = 180, |
| 32 | + logger_in = logger, verbose = True, |
| 33 | + ) |
| 34 | + |
| 35 | + logger.info (stdout) |
| 36 | + logger.info (stderr) |
| 37 | + |
| 38 | + assert exit_code == 0, "SSH command failed" |
0 commit comments