Skip to content

Add new TLS tests to DMM's system tests - #2208

Open
ryanwixon-emerson wants to merge 28 commits into
ni:masterfrom
ryanwixon-emerson:addTLS
Open

ryanwixon-emerson wants to merge 28 commits into
ni:masterfrom
ryanwixon-emerson:addTLS

Conversation

@ryanwixon-emerson

@ryanwixon-emerson ryanwixon-emerson commented Aug 26, 2026

Copy link
Copy Markdown
  • This contribution adheres to CONTRIBUTING.md.

  • I've updated CHANGELOG.md if applicable.

  • I've added tests applicable for this pull request

What does this Pull Request accomplish?

This PR upgrades the TestGrpc system tests to use mTLS encryption options and adds new tests for testing additional encryption options. These changes are only for DMM at the moment, but once this PR is merged, they will be expanded to cover every driver supported by nimi-python.

The gRPC tests in full include:

  • TestGrpcSecuredTLS - Runs the full suite of tests with mTLS encryption, configured via ni-tls-config.
  • TestGrpcUnsecuredTLS - Runs a small set of basic usability tests with ni-tls-config's "Disabled" option.
  • TestGrpcNoTLS - Runs a small set of basic usability tests with no dependency on ni-tls-config at all (this is effectively what is running today)
  • test_unsecured_server - A standalone test ensuring that a TLS-enabled client will notconnect to an unsecured server.
  • test_unsercured_client - A standalone test ensuring that a TLS-enabled server will not allow an unsecured client to connect.

In order to assist with the setup, a version of the nitlsconfigtest is being used. This provides us with utilities to configure the ni-tls-config .yml configuration files, and to provision certificates. This PR also includes two functions which wrap the Python scripts it provides and gives the tests an easy-to-use interface to interact with them.

Also included is a patching function which resolves an issue with the 32-bit tests. Since they now rely on nitlsconfig.exe (installed in System32), the 32-bit test processes do not have a way to invoke it without disabling WOW64 redirection. The patcher provides functionality to do just that, but exclusively for nitlsconfig.exe as to minimize the blast radius.

List issues fixed by this Pull Request below, if any.

N/A - This PR does not address any issues

What testing has been done?

N/A - These are tests themselves. However, I did verify using Wireshark that the tests really are using TLS encryption with the expected configurations.

@ryanwixon-emerson ryanwixon-emerson changed the title Dummy commit Add new TLS System tests Sep 9, 2026
@codecov-commenter

codecov-commenter commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.13%. Comparing base (1e272b6) to head (a87a556).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2208      +/-   ##
==========================================
+ Coverage   88.09%   88.13%   +0.04%     
==========================================
  Files          88       88              
  Lines       22756    22828      +72     
==========================================
+ Hits        20047    20120      +73     
+ Misses       2709     2708       -1     
Flag Coverage Δ
codegenunittests 84.98% <ø> (+0.08%) ⬆️
nidcpowersystemtests 94.40% <ø> (+0.05%) ⬆️
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.04% <ø> (+0.02%) ⬆️
nidigitalunittests 68.43% <ø> (-0.02%) ⬇️
nidmmsystemtests 92.33% <ø> (+0.03%) ⬆️
nifakeunittests 86.08% <ø> (+0.07%) ⬆️
nifgensystemtests 94.34% <ø> (+0.01%) ⬆️
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests 82.71% <ø> (+0.04%) ⬆️
nirfsaunittests 63.40% <ø> (-0.15%) ⬇️
nirfsgsystemtests 81.18% <ø> (+0.05%) ⬆️
niscopesystemtests 89.99% <ø> (+0.03%) ⬆️
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 81.66% <ø> (+0.10%) ⬆️
nitclksystemtests 94.87% <ø> (ø)
nitclkunittests 98.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 nirfsa | 🛠️ Build #34557286 | 📁 Comparing b8806ec against latest (780e6de)

  🔍 Preview build  

1 file changed
± grpc_session_options.html

@ryanwixon-emerson ryanwixon-emerson changed the title Add new TLS System tests Add new TLS tests to DMM's system tests Sep 15, 2026
@ryanwixon-emerson

Copy link
Copy Markdown
Author

Flaky system tests seem to be timing out. It's a different one each time and are part of test suites that this PR does not touch, but everything related to my changes is consistently passing. I'm publishing this PR now to avoid delaying feedback longer.

@ryanwixon-emerson
ryanwixon-emerson marked this pull request as ready for review September 15, 2026 15:19
@ni-jfitzger

Copy link
Copy Markdown
Collaborator

Flaky system tests seem to be timing out. It's a different one each time and are part of test suites that this PR does not touch, but everything related to my changes is consistently passing. I'm publishing this PR now to avoid delaying feedback longer.

You don't need to commit an empty change to rerun a failed PR Check.
If you're unable to rerun it yourself, you can message me and I can rerun the failed jobs. That works better than retriggering all of the checks.

Comment thread src/shared/system_test_utilities.py Outdated
Comment thread src/shared/system_test_utilities.py
Comment thread src/shared/nitlsconfig_32_bit_patch.py Outdated
Comment thread src/nidmm/system_tests/test_system_nidmm.py Outdated
Comment thread src/nidmm/system_tests/test_system_nidmm.py Outdated
Comment thread src/nidmm/system_tests/test_system_nidmm.py Outdated
Comment thread src/nidmm/system_tests/test_system_nidmm.py Outdated
Comment thread src/nidmm/system_tests/test_system_nidmm.py Outdated
Comment thread src/nidmm/system_tests/test_system_nidmm.py
Comment thread src/shared/system_test_utilities.py Outdated
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.

3 participants