-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrational Tests fixes #1744
Integrational Tests fixes #1744
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple minor nits
'UnauthorizedOperation', 'GET_DATASET_FOLDER', folder.locationUri | ||
) | ||
to_be_error = get_folder(client2, locationUri=folder.locationUri) | ||
assert_that(to_be_error).contains('UnauthorizedOperation', 'GET_DATASET_FOLDER', folder.locationUri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we assert it contains an error key and data key both with values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean using assert_that(function).raises(GqlError).when_called_with(args)
? I think it would be good to keep the standard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_folder doesn't return the error
so I doubt to_be_error
will contain this information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Strange, actually. Adriana and me decided to remove this test for good, since the backend has no access resrtictions. It will never work. I'll remove it
) | ||
|
||
|
||
@pytest.mark.dependency(name='unhealthy_items', depends=['share_verified']) | ||
def test_unhealthy_items( | ||
client5, session_cross_acc_env_1_aws_client, session_cross_acc_env_1_integration_role_arn, share_params_main | ||
): | ||
share, _ = share_params_main | ||
share, _, __ = share_params_main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: any reason for double underscore __
on second unpacked and skipped arg? For here and all other occurrences in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to distinguish from one underscore. Will change now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left minor comment
<!-- please choose --> - Bugfix - Fixed attributes' names for new 'restricted' section in queries - Don't expect GQL exceptions - `test_get_folder_unauthorized` removed, since we have no access control for this query - <URL or Ticket> Please answer the questions below briefly where applicable, or write `N/A`. Based on [OWASP 10](https://owasp.org/Top10/en/). - Does this PR introduce or modify any input fields or queries - this includes fetching data from storage outside the application (e.g. a database, an S3 bucket)? - Is the input sanitized? - What precautions are you taking before deserializing the data you consume? - Is injection prevented by parametrizing queries? - Have you ensured no `eval` or similar functions are used? - Does this PR introduce any functionality or component that requires authorization? - How have you ensured it respects the existing AuthN/AuthZ mechanisms? - Are you logging failed auth attempts? - Are you using or adding any cryptographic features? - Do you use a standard proven implementations? - Are the used keys controlled by the customer? Where are they stored? - Are you introducing any new policies/roles/users? - Have you used the least-privilege principle? How? By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Sofia Sazonova <[email protected]>
Feature or Bugfix
Detail
test_get_folder_unauthorized
removed, since we have no access control for this queryRelates
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.