fix: fixing mysql error message (#14416)

* fixing mysql error message

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/db_engine_specs/mysql.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* fixed broken test

* changed error type

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
This commit is contained in:
AAfghahi
2021-04-30 18:15:37 -04:00
committed by GitHub
parent e507508b48
commit 7466595563
4 changed files with 39 additions and 9 deletions

View File

@@ -389,6 +389,31 @@ psql: error: could not connect to server: Operation timed out
)
]
msg = "no password supplied"
result = PostgresEngineSpec.extract_errors(Exception(msg))
assert result == [
SupersetError(
error_type=SupersetErrorType.CONNECTION_ACCESS_DENIED_ERROR,
message="Please re-enter the password.",
level=ErrorLevel.ERROR,
extra={
"engine_name": "PostgreSQL",
"issue_codes": [
{
"code": 1014,
"message": "Issue 1014 - Either the"
" username or the password is wrong.",
},
{
"code": 1015,
"message": "Issue 1015 - Either the database is "
"spelled incorrectly or does not exist.",
},
],
},
)
]
def test_base_parameters_mixin():
parameters = {