Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Fix test values
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Mar 21, 2024
1 parent f8218ec commit 00ac041
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/docker-network/tests/api_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ func Test_PeerManagementAPI(t *testing.T) {
peersResponse, err := managementClient.Peers(getContextWithTimeout(5 * time.Second))
require.NoError(t, err)
require.NotNil(t, peersResponse)
require.Equal(t, 4, len(peersResponse.Peers))
require.Equal(t, 5, len(peersResponse.Peers))
},
},
{
name: "Delete a peer from node 1",
testFunc: func(t *testing.T) {
peersResponse, err := managementClient.Peers(getContextWithTimeout(5 * time.Second))
require.NoError(t, err)
require.NotNil(t, peersResponse)
require.Equal(t, 4, len(peersResponse.Peers))

removedPeerInfo = peersResponse.Peers[0]
require.NoError(t, err)
require.Equal(t, 5, len(peersResponse.Peers))

err = managementClient.RemovePeerByID(getContextWithTimeout(5*time.Second), removedPeerInfo.ID)
require.NoError(t, err)
},
Expand All @@ -85,7 +85,7 @@ func Test_PeerManagementAPI(t *testing.T) {
peersResponse, err := managementClient.Peers(getContextWithTimeout(5 * time.Second))
require.NoError(t, err)
require.NotNil(t, peersResponse)
require.Equal(t, 3, len(peersResponse.Peers))
require.Equal(t, 4, len(peersResponse.Peers))
},
},
{
Expand All @@ -103,7 +103,7 @@ func Test_PeerManagementAPI(t *testing.T) {
peersResponse, err := managementClient.Peers(getContextWithTimeout(5 * time.Second))
require.NoError(t, err)
require.NotNil(t, peersResponse)
require.Equal(t, 4, len(peersResponse.Peers))
require.Equal(t, 5, len(peersResponse.Peers))
},
},
}
Expand Down

0 comments on commit 00ac041

Please sign in to comment.