Skip to content

Commit 4beb71d

Browse files
committed
Add var to disable windows cert store test
1 parent 4e15518 commit 4beb71d

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

builder/actions/setup_cross_ci_crt_environment.py

+15-14
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
environment variables, secrets, files, etc. that is used to build up the testing environment.
1515
"""
1616

17+
# TODO: The variable is used to disable the windows certificate store test to unblock a CI failure.
18+
# The variable should be set to TRUE after the CI is fixed.
19+
ENABLE_WINDOWS_CERT_STORE_TEST = False
20+
1721

1822
class SetupCrossCICrtEnvironment(Action):
1923

@@ -145,6 +149,12 @@ def _setenv_profile_file(self, env, profile_env_name, config_env_name, access_ke
145149
print("[ERROR]: Could not get create profile with name: " + str(profile_env_name))
146150
raise ValueError("Exception occurred trying to create profile")
147151

152+
def _setup_windows_cert_store_test(self, env, certificate_env_name, cerfiticate_s3_path, store_location_env_name):
153+
if (self.is_windows == True and ENABLE_WINDOWS_CERT_STORE_TEST == True):
154+
self._setenv_s3(env, certificate_env_name, cerfiticate_s3_path)
155+
helpers.create_windows_cert_store(
156+
env, certificate_env_name, store_location_env_name)
157+
148158
def _common_setup(self, env):
149159

150160
################################################
@@ -223,14 +233,9 @@ def _common_setup(self, env):
223233
"s3://aws-crt-test-stuff/unit-test-key-pkcs12.pem")
224234
self._setenv(env, "AWS_TEST_MQTT5_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD")
225235

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.
228236
# 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")
237+
self._setup_windows_cert_store_test(env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
238+
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx", "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_CERT_STORE")
234239

235240
# X509
236241
self._setenv_secret(env, "AWS_TEST_MQTT5_IOT_CORE_X509_ENDPOINT", "ci/mqtt5/us/x509/endpoint")
@@ -313,14 +318,10 @@ def _common_setup(self, env):
313318
"s3://aws-crt-test-stuff/unit-test-key-pkcs12.pem")
314319
self._setenv(env, "AWS_TEST_MQTT311_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD")
315320

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.
318321
# 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")
322+
self._setup_windows_cert_store_test(env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
323+
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx",
324+
"AWS_TEST_MQTT311_IOT_CORE_WINDOWS_CERT_STORE")
324325

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

0 commit comments

Comments
 (0)