Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
  • Loading branch information
bobz965 committed Nov 26, 2024
1 parent 4549539 commit 34400a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 44 deletions.
6 changes: 3 additions & 3 deletions pkg/ovs/ovn-nb-acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ func (suite *OvnClientTestSuite) testDeleteAcls() {
acls := make([]*ovnnb.ACL, 0, 5)

match := fmt.Sprintf("%s && udp.dst == %d", matchPrefix, basePort)
acl, err := failedNbClient.newACL(lsName, ovnnb.ACLDirectionToLport, priority, match, ovnnb.ACLActionAllowRelated, util.NetpolACLTier, func(acl *ovnnb.ACL) {
acl, err := failedNbClient.newACL(lsName, ovnnb.ACLDirectionToLport, priority, match, ovnnb.ACLActionAllowRelated, func(acl *ovnnb.ACL) {
if acl.ExternalIDs == nil {
acl.ExternalIDs = make(map[string]string)
}
Expand Down Expand Up @@ -2424,7 +2424,7 @@ func (suite *OvnClientTestSuite) testUpdateACL() {
err := nbClient.CreatePortGroup(pgName, nil)
require.NoError(t, err)

acl, err := nbClient.newACL(pgName, ovnnb.ACLDirectionToLport, priority, match, ovnnb.ACLActionAllowRelated, util.NetpolACLTier)
acl, err := nbClient.newACL(pgName, ovnnb.ACLDirectionToLport, priority, match, ovnnb.ACLActionAllowRelated)
require.NoError(t, err)

err = nbClient.CreateAcls(pgName, portGroupKey, acl)
Expand All @@ -2450,7 +2450,7 @@ func (suite *OvnClientTestSuite) testUpdateACL() {
})

t.Run("fail nb client should log err", func(t *testing.T) {
failACL, err := failedNbClient.newACL(pgName, ovnnb.ACLDirectionToLport, priority, match, ovnnb.ACLActionAllowRelated, util.NetpolACLTier)
failACL, err := failedNbClient.newACL(pgName, ovnnb.ACLDirectionToLport, priority, match, ovnnb.ACLActionAllowRelated)
require.NoError(t, err)

err = failedNbClient.CreateAcls(pgName, portGroupKey, failACL)
Expand Down
41 changes: 0 additions & 41 deletions pkg/ovs/ovn-nb-suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -987,47 +987,6 @@ func (suite *OvnClientTestSuite) Test_GetKubeOvnChassisses() {
suite.testGetKubeOvnChassisses()
}

// ovs
func (suite *OvnClientTestSuite) Test_SetInterfaceBandwidth() {
suite.testSetInterfaceBandwidth()
}

func (suite *OvnClientTestSuite) Test_ClearHtbQosQueue() {
suite.testClearHtbQosQueue()
}

func (suite *OvnClientTestSuite) Test_IsHtbQos() {
suite.testIsHtbQos()
}

func (suite *OvnClientTestSuite) Test_SetHtbQosQueueRecord() {
suite.testSetHtbQosQueueRecord()
}

func (suite *OvnClientTestSuite) Test_SetQosQueueBinding() {
suite.testSetQosQueueBinding()
}

func (suite *OvnClientTestSuite) Test_SetNetemQos() {
suite.testSetNetemQos()
}

func (suite *OvnClientTestSuite) Test_GetNetemQosConfig() {
suite.testGetNetemQosConfig()
}

func (suite *OvnClientTestSuite) Test_DeleteNetemQosByID() {
suite.testDeleteNetemQosByID()
}

func (suite *OvnClientTestSuite) Test_IsUserspaceDataPath() {
suite.testIsUserspaceDataPath()
}

func (suite *OvnClientTestSuite) Test_CheckAndUpdateHtbQos() {
suite.testCheckAndUpdateHtbQos()
}

func (suite *OvnClientTestSuite) Test_UpdateOVSVsctlLimiter() {
suite.testUpdateOVSVsctlLimiter()
}
Expand Down

0 comments on commit 34400a3

Please sign in to comment.