Skip to content

Commit de939a8

Browse files
authored
[Internal] Fix test_iam::test_scim_error_unmarshall integration test (#743)
## Changes The error message returned by the SCIM API when using an invalid filter changed, breaking our integration test. This PR updates the test to check for the type of error returned, which should be robust to error message changes. The new error message, `InvalidFilter request failed`, is worse in my opinion, so I will raise this with the identity team. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [ ] `make fmt` applied - [ ] relevant integration tests applied
1 parent 3dab457 commit de939a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/integration/test_iam.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pytest
22

3+
from databricks.sdk import errors
34
from databricks.sdk.core import DatabricksError
45

56

@@ -13,7 +14,7 @@ def test_scim_error_unmarshall(w, random):
1314
with pytest.raises(DatabricksError) as exc_info:
1415
groups = w.groups.list(filter=random(12))
1516
next(groups)
16-
assert 'Given filter operator is not supported' in str(exc_info.value)
17+
assert isinstance(exc_info.value, errors.BadRequest)
1718

1819

1920
def test_scim_get_user_as_dict(w):

0 commit comments

Comments
 (0)