Skip to content

Commit

Permalink
fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tutkat committed Oct 7, 2024
1 parent 52e7018 commit 5affe17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ public class ConnectionsApiTest {
public static void removeConnections(UsersItem.UserName userName) {
try {
Thread.sleep(20000);
users.get(userName).getUserResources().getConnectionsUuid().forEach(uuid -> {
try {
deleteConnection(uuid);
} catch (ApiException e) {
throw new RuntimeException(e);
}
});
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
users.get(userName).getUserResources().getConnectionsUuid().forEach(uuid -> {
try {
deleteConnection(uuid);
} catch (ApiException e) {
throw new RuntimeException(e);
}
});
}

@BeforeClass
Expand Down Expand Up @@ -177,7 +177,7 @@ public static Connection createConnectionFCR2ToPort() throws ApiException {

Port port = portList.get(r.nextInt(portList.size()));

ConnectionPostRequest connectionPostRequest = getDefaultConnectionRequest("panthers-con-fcr-2-port")
ConnectionPostRequest connectionPostRequest = getDefaultConnectionRequest("panthers-con-fc2p")
.type(ConnectionType.IP_VC)
.bandwidth(1000)
.project(new Project().projectId(userDto.getProjectId()))
Expand Down Expand Up @@ -229,7 +229,7 @@ public static Connection createPort2SpConnection() throws ApiException {
UsersItem usersItem = Utils.getUserData(getCurrentUser());
PortDto portDto = usersItem.getPorts().get(0);

ConnectionPostRequest connectionPostRequest = getDefaultConnectionRequest("panthers-con-port-2-sp")
ConnectionPostRequest connectionPostRequest = getDefaultConnectionRequest("panthers-con-p2sp")
.bandwidth(serviceProfile.getAccessPointTypeConfigs().get(0).getServiceProfileAccessPointTypeCOLO().getSupportedBandwidths().get(0))
.type(ConnectionType.EVPL_VC)
.redundancy(new ConnectionRedundancy().priority(ConnectionPriority.PRIMARY))
Expand Down Expand Up @@ -275,6 +275,7 @@ public static Connection createPort2SpConnection() throws ApiException {
@Test
public void updateConnectionByUuid() throws ApiException {
Connection connection = createPort2Port();
waitForConnectionIsInState(connection.getUuid(), EquinixStatus.PROVISIONED);
String updatedName = "updated_p2p_connection";

ConnectionChangeOperation connectionChangeOperation = new ConnectionChangeOperation()
Expand Down Expand Up @@ -312,7 +313,7 @@ public static Connection createPort2Port() throws ApiException {
int tagAside = getRandomVlanNumber();
int tagZside = getRandomVlanNumber();

ConnectionPostRequest connectionPostRequest = getDefaultConnectionRequest("panthers-con-port-2-port")
ConnectionPostRequest connectionPostRequest = getDefaultConnectionRequest("panthers-con-p2p")
.bandwidth(1000)
.type(ConnectionType.EVPL_VC)
.redundancy(new ConnectionRedundancy().priority(ConnectionPriority.PRIMARY))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

import java.util.UUID;

import static com.equinix.openapi.fabric.tests.helpers.Apis.networksApi;
import static com.equinix.openapi.fabric.tests.helpers.Apis.setUserName;
import static com.equinix.openapi.fabric.tests.helpers.Apis.*;
import static com.equinix.openapi.fabric.tests.helpers.TokenGenerator.users;
import static java.util.Collections.singletonList;
import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -50,7 +49,7 @@ public static void removeResources() {
public Network createNetwork() throws ApiException {
UsersItem user = Utils.getUserData(userName);
NetworkPostRequest networkPostRequest = new NetworkPostRequest()
.name("network_panthers_test")
.name("panthers_network" + getCurrentUser().getValue())
.type(NetworkType.EVPLAN)
.scope(NetworkScope.LOCAL)
.project(new Project().projectId(user.getProjectId()))
Expand Down Expand Up @@ -124,7 +123,7 @@ public void getNetworkByUuid() throws ApiException {
*/
@Test
public void updateNetwork() throws ApiException {
String updatedName = "network_new_updatedName";
String updatedName = "panthers_network_updated";
Network network = createNetwork();
NetworkChangeOperation changeOperation = new NetworkChangeOperation()
.op(NetworkChangeOperation.OpEnum.REPLACE)
Expand Down

0 comments on commit 5affe17

Please sign in to comment.