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

exact match & wildcard test case issue resolution/updation #45

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

amarsri28
Copy link
Contributor

This Pr will enable test cases for exact-match & Wildcard. one common test case is still not working so it has been disabled for now.

Copy link
Contributor Author

@amarsri28 amarsri28 left a comment

Choose a reason for hiding this comment

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

did cosmetic change as suggested by reviewer. no impact on functionality

@gab-arrobo
Copy link
Contributor

@amarsri28 please rebase this branch

Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

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

+1 (LGTM)
Note: assertEquals was deprecated and assertEqual has to be used instead

Comment on lines +143 to +169
#def test_wildcardmatch_selfconfig(self):
# "make sure get_initial_arg and [gs]et_runtime_config work"
# iconf = {
# 'fields': [{'attr_name': 'babylon5', 'num_bytes': 2},
# {'offset': 10, 'num_bytes': 1}]
# }
# wm = WildcardMatch(**iconf)
# # workers are all paused, we never run them here
# m1 = vstring([0xff, 0xf0], [0x7f])
# v1 = vstring([0x88, 0x80], [0x03])
# wm.add(gate=1, priority=1, masks=m1, values=v1)
# m2 = vstring([0xf0, 0xff], [0x3f])
# v2 = vstring([0x70, 0x70], [0x05])
# wm.add(gate=2, priority=2, masks=m2, values=v2)
# wm.set_default_gate(gate=3)
# # Delivered config is sorted by priority, then gate, then mask,
# # then values. Since we use a different priority for each we can
# # just sort by priority here.
# expect_config = {
# 'default_gate': 3,
# 'rules': [
# {'priority': 1, 'gate': 1, 'masks': m1, 'values': v1},
# {'priority': 2, 'gate': 2, 'masks': m2, 'values': v2},
# ]
# }
# arg = pb_conv.protobuf_to_dict(wm.get_initial_arg())
# cur_config = pb_conv.protobuf_to_dict(wm.get_runtime_config())
Copy link
Contributor

Choose a reason for hiding this comment

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

@amarsri28, please open an issue about this so we keep track of it. Thanks!

@gab-arrobo gab-arrobo merged commit 9d7120e into omec-project:master Mar 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants