Skip to content

Commit

Permalink
[pbh]: VS UTs rev03.
Browse files Browse the repository at this point in the history
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
  • Loading branch information
nazariig committed Jul 26, 2021
1 parent 8081558 commit 8ac7bd1
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions tests/test_pbh.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,14 +708,15 @@ def test_PbhHashCreationDeletionWithDependencies(self, testlog):
self.dvs_pbh.verify_pbh_hash_field_count(1)
self.dvs_pbh.verify_pbh_hash_count(1)
finally:
# PBH hash field
pbhlogger.info("Remove PBH hash field: {}".format(PBH_HASH_FIELD_NAME))
self.dvs_pbh.remove_pbh_hash_field(PBH_HASH_FIELD_NAME)
self.dvs_pbh.verify_pbh_hash_field_count(1)

# PBH hash
pbhlogger.info("Remove PBH hash: {}".format(PBH_HASH_NAME))
self.dvs_pbh.remove_pbh_hash(PBH_HASH_NAME)
self.dvs_pbh.verify_pbh_hash_count(0)

# PBH hash field
pbhlogger.info("Remove PBH hash field: {}".format(PBH_HASH_FIELD_NAME))
self.dvs_pbh.remove_pbh_hash_field(PBH_HASH_FIELD_NAME)
self.dvs_pbh.verify_pbh_hash_field_count(0)

def test_PbhRuleCreationDeletionWithDependencies(self, testlog):
Expand Down Expand Up @@ -767,24 +768,26 @@ def test_PbhRuleCreationDeletionWithDependencies(self, testlog):
self.dvs_acl.verify_acl_rule_count(1)

finally:
# PBH table
pbhlogger.info("Remove PBH table: {}".format(PBH_TABLE_NAME))
self.dvs_pbh.remove_pbh_table(PBH_TABLE_NAME)
self.dvs_acl.verify_acl_table_count(1)

# PBH rule
pbhlogger.info("Remove PBH rule: {}".format(PBH_RULE_NAME))
self.dvs_pbh.remove_pbh_rule(PBH_TABLE_NAME, PBH_RULE_NAME)
self.dvs_acl.verify_acl_rule_count(0)

# PBH table
pbhlogger.info("Remove PBH table: {}".format(PBH_TABLE_NAME))
self.dvs_pbh.remove_pbh_table(PBH_TABLE_NAME)
self.dvs_acl.verify_acl_table_count(0)

# PBH hash field
pbhlogger.info("Remove PBH hash field: {}".format(PBH_HASH_FIELD_NAME))
self.dvs_pbh.remove_pbh_hash_field(PBH_HASH_FIELD_NAME)
self.dvs_pbh.verify_pbh_hash_field_count(1)

# PBH hash
pbhlogger.info("Remove PBH hash: {}".format(PBH_HASH_NAME))
self.dvs_pbh.remove_pbh_hash(PBH_HASH_NAME)
self.dvs_pbh.verify_pbh_hash_count(0)

# PBH hash field
pbhlogger.info("Remove PBH hash field: {}".format(PBH_HASH_FIELD_NAME))
self.dvs_pbh.remove_pbh_hash_field(PBH_HASH_FIELD_NAME)
self.dvs_pbh.verify_pbh_hash_field_count(0)


Expand Down

0 comments on commit 8ac7bd1

Please sign in to comment.