Skip to content

Commit 1f08386

Browse files
committed
a quick test for windows modulePath
1 parent b491a29 commit 1f08386

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

builder/actions/setup_cross_ci_crt_environment.py

+11-15
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,12 @@ def _common_setup(self, env):
223223
"s3://aws-crt-test-stuff/unit-test-key-pkcs12.pem")
224224
self._setenv(env, "AWS_TEST_MQTT5_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD")
225225

226-
# TODO: The windows certificate env var is disabled as it is failing in CI. We will bring it back once
227-
# it is fixed.
228-
# # Windows Key Cert
229-
# if (self.is_windows == True):
230-
# self._setenv_s3(env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
231-
# "s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx")
232-
# helpers.create_windows_cert_store(
233-
# env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS", "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_CERT_STORE")
226+
# Windows Key Cert
227+
if (self.is_windows == True):
228+
self._setenv_s3(env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
229+
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx")
230+
helpers.create_windows_cert_store(
231+
env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS", "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_CERT_STORE")
234232

235233
# X509
236234
self._setenv_secret(env, "AWS_TEST_MQTT5_IOT_CORE_X509_ENDPOINT", "ci/mqtt5/us/x509/endpoint")
@@ -313,14 +311,12 @@ def _common_setup(self, env):
313311
"s3://aws-crt-test-stuff/unit-test-key-pkcs12.pem")
314312
self._setenv(env, "AWS_TEST_MQTT311_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD")
315313

316-
# TODO: The windows certificate env var is disabled as it is failing in CI. We will bring it back once
317-
# it is fixed.
318314
# Windows Key Cert
319-
# if (self.is_windows == True):
320-
# self._setenv_s3(env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
321-
# "s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx")
322-
# helpers.create_windows_cert_store(
323-
# env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS", "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_CERT_STORE")
315+
if (self.is_windows == True):
316+
self._setenv_s3(env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
317+
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx")
318+
helpers.create_windows_cert_store(
319+
env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS", "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_CERT_STORE")
324320

325321
# X509
326322
self._setenv_secret(env, "AWS_TEST_MQTT311_IOT_CORE_X509_ENDPOINT", "ci/mqtt5/us/x509/endpoint")

builder/actions/setup_cross_ci_helpers.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def create_windows_cert_store(env, certificate_env, location_env):
2020
return
2121
pfx_cert_path = env.shell.getenv(certificate_env)
2222

23+
# quick test
24+
env.shell.exec("powershell.exe",["$env:PSModulePath=[Environment]::GetEnvironmentVariable('PSModulePath', 'Machine')"], check=True)
25+
2326
# Import the PFX into the Windows Certificate Store
2427
# (Passing '$mypwd' is required even though it is empty and our certificate has no password. It fails CI otherwise)
2528
import_pfx_arguments = [

0 commit comments

Comments
 (0)