Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Jul 8, 2024
1 parent 7f1dd09 commit f827a04
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/nsx/services/nsxserviceaccount/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ func TestNSXServiceAccountService_CreateOrUpdateNSXServiceAccount(t *testing.T)
ResourceType: &antreaClusterResourceType,
Certificate: nil,
VhcPath: &vpcPath,
NodeType: &nodeTypeAntrea,
Tags: []model.Tag{{
Scope: &tagScopeCluster,
Tag: &s.NSXConfig.CoeConfig.Cluster,
Expand All @@ -328,7 +329,7 @@ func TestNSXServiceAccountService_CreateOrUpdateNSXServiceAccount(t *testing.T)
}})
patches.ApplyMethodSeq(s.NSXClient, "NSXCheckVersion", []gomonkey.OutputCell{{
Values: gomonkey.Params{true},
Times: 1,
Times: 2,
}})
return patches
},
Expand Down Expand Up @@ -446,7 +447,7 @@ func TestNSXServiceAccountService_CreateOrUpdateNSXServiceAccount(t *testing.T)
}})
patches.ApplyMethodSeq(s.NSXClient, "NSXCheckVersion", []gomonkey.OutputCell{{
Values: gomonkey.Params{true},
Times: 1,
Times: 2,
}})
return patches
},
Expand Down Expand Up @@ -888,6 +889,10 @@ func TestNSXServiceAccountService_RestoreRealizedNSXServiceAccount(t *testing.T)
}, nil},
Times: 1,
}})
patches.ApplyMethodSeq(s.NSXClient, "NSXCheckVersion", []gomonkey.OutputCell{{
Values: gomonkey.Params{true},
Times: 1,
}})
return patches
},
args: args{
Expand Down

0 comments on commit f827a04

Please sign in to comment.