From 67e14095dbbe2c8c0c1d92d813772a0679c224f1 Mon Sep 17 00:00:00 2001 From: OuyangHang33 Date: Thu, 7 Mar 2024 21:52:50 +0800 Subject: [PATCH] Fix quote_verification test case copy ca_cert fail randomly Signed-off-by: OuyangHang33 --- sh_script/integration_test.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sh_script/integration_test.py b/sh_script/integration_test.py index de830c0..8d2339c 100644 --- a/sh_script/integration_test.py +++ b/sh_script/integration_test.py @@ -236,11 +236,11 @@ def test_config_A_quote_verification(): LOG.debug(verify_ca_cmd) runner = ctx.exec_ssh_command(verify_ca_cmd) assert runner[1] == "", "Verify CA fail: {}".format(runner[1]) + time.sleep(5) cwd = os.getcwd() copy_ca_to_host_cmd = f"virt-copy-out -a '{ctx.guest_img}' '/root/ca_cert.pem' '{ctx.quote_verification_sample_path}'\n" - ca_host_path = os.path.join(ctx.quote_verification_sample_path, "ca_cert.pem") - quote_verf_app_path = os.path.join(ctx.quote_verification_sample_path, "app") + time.sleep(5) ca_host_path = os.path.join(ctx.quote_verification_sample_path, "ca_cert.pem") quote_verf_app_path = os.path.join(ctx.quote_verification_sample_path, "app") @@ -817,12 +817,12 @@ def test_config_B_no_sb_quote_verification(): LOG.debug(verify_ca_cmd) runner = ctx.exec_ssh_command(verify_ca_cmd) assert runner[1] == "", "Verify CA fail: {}".format(runner[1]) - + time.sleep(5) + cwd = os.getcwd() copy_ca_to_host_cmd = f"virt-copy-out -a '{ctx.guest_img}' '/root/ca_cert.pem' '{ctx.quote_verification_sample_path}'\n" - ca_host_path = os.path.join(ctx.quote_verification_sample_path, "ca_cert.pem") - quote_verf_app_path = os.path.join(ctx.quote_verification_sample_path, "app") - + time.sleep(5) + ca_host_path = os.path.join(ctx.quote_verification_sample_path, "ca_cert.pem") quote_verf_app_path = os.path.join(ctx.quote_verification_sample_path, "app") quote_path = os.path.join(ctx.quote_verification_sample_path, "quote.data") @@ -1351,12 +1351,12 @@ def test_config_B_sb_quote_verification(): LOG.debug(verify_ca_cmd) runner = ctx.exec_ssh_command(verify_ca_cmd) assert runner[1] == "", "Verify CA fail: {}".format(runner[1]) - + time.sleep(5) + cwd = os.getcwd() copy_ca_to_host_cmd = f"virt-copy-out -a '{ctx.guest_img}' '/root/ca_cert.pem' '{ctx.quote_verification_sample_path}'\n" - ca_host_path = os.path.join(ctx.quote_verification_sample_path, "ca_cert.pem") - quote_verf_app_path = os.path.join(ctx.quote_verification_sample_path, "app") - + time.sleep(5) + ca_host_path = os.path.join(ctx.quote_verification_sample_path, "ca_cert.pem") quote_verf_app_path = os.path.join(ctx.quote_verification_sample_path, "app") quote_path = os.path.join(ctx.quote_verification_sample_path, "quote.data")