Skip to content

test: add null SSL details fallback test#41840

Open
lupingblaine wants to merge 1 commit into
appsmithorg:releasefrom
lupingblaine:test/41627-null-ssl-details
Open

test: add null SSL details fallback test#41840
lupingblaine wants to merge 1 commit into
appsmithorg:releasefrom
lupingblaine:test/41627-null-ssl-details

Conversation

@lupingblaine
Copy link
Copy Markdown

@lupingblaine lupingblaine commented May 22, 2026

Summary

Adds a regression test for the MSSQL SSL fallback fix.

This test verifies that when the SSLDetails object is null, the plugin gracefully defaults to encrypt=false instead of throwing an exception.

Why this test matters

This test validates the intermediate null-guard branch in addSslOptionsToUrlBuilder() and ensures datasource creation remains robust even when SSL configuration is partially initialized.

Fixes #41627

Summary by CodeRabbit

  • Tests
    • Added test coverage to verify SSL encryption defaults to disabled when datasource SSL configuration is not provided.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e513a28f-84e1-40f0-8a31-996037f25b59

📥 Commits

Reviewing files that changed from the base of the PR and between 3d5deb5 and 895f558.

📒 Files selected for processing (1)
  • app/server/appsmith-plugins/mssqlPlugin/src/test/java/com/external/plugins/MssqlPluginTest.java

Walkthrough

Adds a new test case testSslDefaultsToDisable_whenSslDetailsAreNull to the MSSQL plugin test suite. The test verifies that when datasource SSL details are null, mssqlPluginExecutor.datasourceCreate() returns a non-null HikariDataSource whose JDBC URL includes encrypt=false.

Changes

MSSQL SSL Defaults

Layer / File(s) Summary
SSL null defaults test
app/server/appsmith-plugins/mssqlPlugin/src/test/java/com/external/plugins/MssqlPluginTest.java
New test case sets dsConfig.getConnection().setSsl(null), invokes datasource creation, and asserts the JDBC URL contains encrypt=false.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🔒 When SSL turns null, encryption fades,
A test ensures safe defaults cascade,
JDBC encrypts, or so it's planned—
The null case now is clearly spanned. ✅

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR description states it fixes #41627, but the test added (null SSL fallback) does not address the actual issue objective of adding SeaTable as a native data source plugin. Verify the correct issue is linked. The test appears to address MSSQL SSL handling, not SeaTable plugin implementation as described in #41627.
Out of Scope Changes check ⚠️ Warning The test addition for MSSQL null SSL fallback is unrelated to the linked issue #41627 which requests SeaTable plugin implementation. Clarify the correct linked issue for this MSSQL SSL test, or confirm if this PR was mistakenly linked to the wrong issue.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a test for null SSL details fallback behavior in the MSSQL plugin.
Description check ✅ Passed The description covers the test's purpose and includes a reference to issue #41627, but is missing sections from the template like automation tags and DevRel communication checkbox.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

feat: Add SeaTable as native data source plugin

1 participant