-
Notifications
You must be signed in to change notification settings - Fork 592
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(agw): fix incorrect asserts in agw integ tests #14012
Conversation
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
response.msg_type, | ||
s1ap_types.tfwCmd.UE_CTX_REL_IND.value, | ||
) | ||
assert response.msg_type == s1ap_types.tfwCmd.UE_CTX_REL_IND.value |
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.
The similar changes are required in other test cases, test_attach_detach_secondary_pdn_no_disconnect.py, test_attach_detach_multiple_secondary_pdn.py, test_attach_implicit_detach_timer_expiry.py, test_enb_partial_reset_multi_ue.py, test_enb_partial_reset_with_unknown_ue_s1ap_ids.py, test_secondary_pdn_reject_multiple_sessions_not_allowed_per_apn.py and many more.
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.
Yes, I am aware that about 100 tests or so still use self.assertEqual
and similar functions instead of assert
. The goal of this PR was to just fix the incorret assertTrue
, where an assertEqual
should have been used. A switch from the old to the new syntax in all tests will be done in a separate PR (maybe these changes here should be moved to that PR as well then?).
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.
nvm, I added these changes and separated them into several commits by fixing the incorrect asserts and changing the syntax
Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com>
This commit changes * self.assertEqual and self.assertListEqual to assert ... == ... * self.assertTrue to assert * self.assertGreater to assert ... > ... * self.assertGreaterEqual to assert ... >= ... * self.assertLessEqual to assert ... <= ... * self.assertIn to assert ... in ... * self.assertIsNotNone to assert ... is not None Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com>
d567e31
to
eb8a8cf
Compare
lte/gateway/python/integ_tests/s1aptests/test_attach_detach_setsessionrules_tcp_data.py
Show resolved
Hide resolved
lte/gateway/python/integ_tests/s1aptests/test_attach_detach_setsessionrules_tcp_data.py
Show resolved
Hide resolved
lte/gateway/python/integ_tests/s1aptests/test_attach_detach_multiple_rar_tcp_data.py
Show resolved
Hide resolved
lte/gateway/python/integ_tests/s1aptests/test_attach_detach_multiple_rar_tcp_data.py
Show resolved
Hide resolved
lte/gateway/python/integ_tests/s1aptests/test_agw_offload_mixed_idle_active_multiue.py
Show resolved
Hide resolved
lte/gateway/python/integ_tests/s1aptests/test_agw_offload_idle_active_ue.py
Show resolved
Hide resolved
lte/gateway/python/integ_tests/s1aptests/test_agw_offload_idle_active_ue.py
Show resolved
Hide resolved
Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com>
eb8a8cf
to
edb74fd
Compare
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.
LGTM
* fix(agw): fix incorrect usage of self.assertTrue Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com> * chore(agw): change to new pytest assert syntax This commit changes * self.assertEqual and self.assertListEqual to assert ... == ... * self.assertTrue to assert * self.assertGreater to assert ... > ... * self.assertGreaterEqual to assert ... >= ... * self.assertLessEqual to assert ... <= ... * self.assertIn to assert ... in ... * self.assertIsNotNone to assert ... is not None Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com> * chore(agw): cleanup line lengths from previous commits Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com> Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com>
Signed-off-by: Sebastian Wolf sebastian.wolf@tngtech.com
Summary
assertTrue
toassert ... == ...
for response message assertsassertEqual
in the touched tests to the new syntax as wellTest Plan
Run the touched integ tests
Additional Information