Files
superset2/tests/unit_tests/commands/databases/validate_test.py
Enzo Martellucci f846e106b8 fix(database): tighten validate_parameters SSH and bypass-engine paths
Three correctness fixes to ValidateDatabaseParametersCommand:

1. Bypass engines (bigquery, datastore, snowflake) now also surface
   database_name uniqueness errors and SSH tunnel field errors during
   progressive validation, instead of silently passing.

2. The SSH feature-flag and database-port guards now fire when the UI
   marks parameters.ssh, not just when the ssh_tunnel payload is
   non-empty — the form sends an empty tunnel object in early stages.

3. The "parameters are missing" message for SSH tunnel fields now
   interpolates the %(missing)s placeholder via gettext, so the
   response surfaces the actual missing fields instead of the literal
   token.

Adds unit tests for each branch and removes the now-unused
_validate_database_name helper.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 12:32:35 +02:00

18 KiB