Skip to content

Commit

Permalink
declare vnet variable
Browse files Browse the repository at this point in the history
  • Loading branch information
smittal22 committed Sep 13, 2024
1 parent b74b4a6 commit 437daa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cns/restserver/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,7 @@ func TestUnpublishNCViaCNS(t *testing.T) {
func TestUnpublishViaCNSRequestBody(t *testing.T) {
createNetworkContainerURL := "http://" + nmagentEndpoint + "/machine/plugins/?comp=nmagent&type=NetworkManagement/interfaces/dummyIntf/networkContainers/dummyNCURL/authenticationToken/dummyT/api-version/1"
deleteNetworkContainerURL := "http://" + nmagentEndpoint + "/machine/plugins/?comp=nmagent&type=NetworkManagement/interfaces/dummyIntf/networkContainers/dummyNCURL/authenticationToken/dummyT/api-version/1/method/DELETE"
vnet := "vnet1"
wsProxy := fakes.WireserverProxyFake{}
cleanup := setWireserverProxy(svc, &wsProxy)
defer cleanup()
Expand Down Expand Up @@ -1118,9 +1119,9 @@ func TestUnpublishViaCNSRequestBody(t *testing.T) {
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
errPublish := publishNCViaCNS("vnet1", tt.ncID, createNetworkContainerURL)
errPublish := publishNCViaCNS(vnet, tt.ncID, createNetworkContainerURL)
require.NoError(t, errPublish)
errUnpublish := unpublishNCViaCNS("vnet1", tt.ncID, deleteNetworkContainerURL, tt.body)
errUnpublish := unpublishNCViaCNS(vnet, tt.ncID, deleteNetworkContainerURL, tt.body)
if tt.requireError {
require.Error(t, errUnpublish)
} else {
Expand Down

0 comments on commit 437daa7

Please sign in to comment.