Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional unit-tests and unit-test adjustment #499

Merged
merged 69 commits into from
May 25, 2023
Merged

Conversation

TwistedTwigleg
Copy link
Contributor

Description of changes:

Adds new unit tests to check for MQTT311 and MQTT5 connections for:

  • PKCS11
  • PKCS12
  • Profile credentials provider
  • Environment credentials provider
  • Windows Certificate Store
  • etc.

It uses a new CRT builder action here to setup the environment variables. Finally, it adjusts Codebuild to also use the CRT builder so everything has the same setup across the board.

*Note: This PR is always going to be marked as "failing" due to aws-crt-cpp-integration-tests in Codebuild, as it uses an older container that doesn't support a new-enough version of Python. The aws-crt-cpp-integration-tests-tmp is the equivalent, but with a newer container. I will update aws-crt-cpp-integration-tests with the container prior to merge.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
tests/CMakeLists.txt Outdated Show resolved Hide resolved
tests/IotServiceTest.cpp Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
tests/MqttClientTest.cpp Outdated Show resolved Hide resolved
AWS_STATIC_STRING_FROM_LITERAL(s_mqtt5_test_envName_iot_x509_ca, "AWS_TEST_MQTT5_IOT_CORE_X509_CA");

// Needed to return "success" instead of skip in Codebuild so it doesn't count as a failure
AWS_STATIC_STRING_FROM_LITERAL(s_mqtt5_test_envName_codebuild, "CODEBUILD_BUILD_ID");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized that the SKIPPED tests will be treated as failure for ctest, sorry that it caused the issue here.
The issue is fixed in CMake 3.9, while we are using 3.1 as the minimum requirement cross the SDKs. This is just a note that we could probably remove the check when we bump the minimum support for CMake to 3.9.

CMakeLists.txt Outdated Show resolved Hide resolved
@TwistedTwigleg TwistedTwigleg enabled auto-merge (squash) May 25, 2023 13:23
@TwistedTwigleg TwistedTwigleg merged commit 4716c95 into main May 25, 2023
@TwistedTwigleg TwistedTwigleg deleted the unit_test_refactor branch May 25, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants