Skip to content
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

Fix Network Interface Test #605

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crt/aws-lc
5 changes: 3 additions & 2 deletions test/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ def test_sanity_secure(self):
self.assertIsNotNone(s3_client)

def test_sanity_network_interface_names(self):
s3_client = s3_client_new(True, self.region, network_interface_names=("eth0", "eth1"))
self.assertIsNotNone(s3_client)
# This is just a sanity test to ensure that we are passing the parameter correctly.
with self.assertRaises(Exception):
s3_client_new(True, self.region, network_interface_names=("eth0", "invalid-network-interface"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also check the happy case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not easy to test since only a few platforms have a happy case, and even then, it's different for each platform. This test is only verifying that we pass the value to c-s3 correctly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a comment here that the functionality was tested in C properly, and here we make sure the binding works.

Copy link
Contributor Author

@waahm7 waahm7 Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "sanity" in the test name already signifies this intent. I can add a comment if you still think we should include one here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we have bunch of sanity in the name of the test in aws-c-*, they are meant to simply test it works in the happy case,. eg: https://github.com/awslabs/aws-c-http/blob/main/tests/CMakeLists.txt#L410

I don't think we have a fairly common agreement on "sanity" in the test name means.

It's fine to me. But just mentioning.


def test_wait_shutdown(self):
s3_client = s3_client_new(False, self.region)
Expand Down
Loading