Skip to content

Add tests for process-environment.sh and fix POSIX compliance#1629

Merged
kmcginnes merged 3 commits intoaws:mainfrom
kmcginnes:posix-process-environment-tests
Apr 2, 2026
Merged

Add tests for process-environment.sh and fix POSIX compliance#1629
kmcginnes merged 3 commits intoaws:mainfrom
kmcginnes:posix-process-environment-tests

Conversation

@kmcginnes
Copy link
Copy Markdown
Collaborator

@kmcginnes kmcginnes commented Apr 1, 2026

Description

Add a comprehensive test suite for process-environment.sh and fix POSIX shell compliance issues.

  • Add 26 tests covering SSL defaults, Neptune notebook overrides, config.json priority, defaultConnection.json generation, SERVICE_TYPE auto-detection, custom config paths, and file behavior
  • Replace echo -e with printf for POSIX compliance since echo -e is a bashism
  • Replace == with = in test expressions since == is not POSIX sh
  • Tests now run under sh to match the script shebang

Validation

  • All 26 tests pass under sh
  • pnpm checks passes (lint, format, types)
  • pnpm test passes for the new test file

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.20%. Comparing base (c5affc5) to head (20de3b6).
⚠️ Report is 113 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1629       +/-   ##
===========================================
+ Coverage   47.81%   62.20%   +14.39%     
===========================================
  Files         382      389        +7     
  Lines        8525     8952      +427     
  Branches     3159     3430      +271     
===========================================
+ Hits         4076     5569     +1493     
+ Misses       3070     2338      -732     
+ Partials     1379     1045      -334     
Flag Coverage Δ
unittests 62.20% <ø> (+14.39%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kmcginnes kmcginnes marked this pull request as ready for review April 2, 2026 20:53
@kmcginnes kmcginnes merged commit 7b9217a into aws:main Apr 2, 2026
3 of 4 checks passed
@kmcginnes kmcginnes deleted the posix-process-environment-tests branch April 2, 2026 21:10
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.

2 participants