@@ -41,9 +41,9 @@ public class RedfishClientTest {
4141 private static final String PASSWORD = "password" ;
4242 private static final String oobAddress = "oob.host.address" ;
4343 private static final String systemId = "SystemID.1" ;
44- private final static String COMPUTER_SYSTEM_RESET_URL_PATH = "/ Actions/ComputerSystem.Reset" ;
44+ private final static String COMPUTER_SYSTEM_RESET_URL_PATH = "Actions/ComputerSystem.Reset" ;
4545 private final static Integer REDFISHT_REQUEST_RETRIES = Integer .valueOf (2 );
46- private static final String url = "https://address.system.net/redfish/v1/Systems/ " ;
46+ private static final String url = "https://address.system.net/redfish/v1/Systems" ;
4747 private static final HttpRequestBase httpReq = new HttpGet (url );
4848
4949 @ Mock
@@ -87,31 +87,31 @@ public void validateAddressAndPrepareForUrlTestIpv6() {
8787 public void buildRequestUrlTestHttpsGetSystemId () {
8888 RedfishClient redfishclient = new RedfishClient (USERNAME , PASSWORD , true , false , REDFISHT_REQUEST_RETRIES );
8989 String result = redfishclient .buildRequestUrl (oobAddress , RedfishClient .RedfishCmdType .GetSystemId , systemId );
90- String expected = String .format ("https://%s/redfish/v1/Systems/ " , oobAddress );
90+ String expected = String .format ("https://%s/redfish/v1/Systems" , oobAddress );
9191 Assert .assertEquals (expected , result );
9292 }
9393
9494 @ Test
9595 public void buildRequestUrlTestGetSystemId () {
9696 RedfishClient redfishclient = new RedfishClient (USERNAME , PASSWORD , false , false , REDFISHT_REQUEST_RETRIES );
9797 String result = redfishclient .buildRequestUrl (oobAddress , RedfishClient .RedfishCmdType .GetSystemId , systemId );
98- String expected = String .format ("http://%s/redfish/v1/Systems/ " , oobAddress );
98+ String expected = String .format ("http://%s/redfish/v1/Systems" , oobAddress );
9999 Assert .assertEquals (expected , result );
100100 }
101101
102102 @ Test
103103 public void buildRequestUrlTestHttpsComputerSystemReset () {
104104 RedfishClient redfishclient = new RedfishClient (USERNAME , PASSWORD , true , false , REDFISHT_REQUEST_RETRIES );
105105 String result = redfishclient .buildRequestUrl (oobAddress , RedfishClient .RedfishCmdType .ComputerSystemReset , systemId );
106- String expected = String .format ("https://%s/redfish/v1/Systems/%s%s" , oobAddress , systemId , COMPUTER_SYSTEM_RESET_URL_PATH );
106+ String expected = String .format ("https://%s/redfish/v1/Systems/%s/ %s" , oobAddress , systemId , COMPUTER_SYSTEM_RESET_URL_PATH );
107107 Assert .assertEquals (expected , result );
108108 }
109109
110110 @ Test
111111 public void buildRequestUrlTestComputerSystemReset () {
112112 RedfishClient redfishclient = new RedfishClient (USERNAME , PASSWORD , false , false , REDFISHT_REQUEST_RETRIES );
113113 String result = redfishclient .buildRequestUrl (oobAddress , RedfishClient .RedfishCmdType .ComputerSystemReset , systemId );
114- String expected = String .format ("http://%s/redfish/v1/Systems/%s%s" , oobAddress , systemId , COMPUTER_SYSTEM_RESET_URL_PATH );
114+ String expected = String .format ("http://%s/redfish/v1/Systems/%s/ %s" , oobAddress , systemId , COMPUTER_SYSTEM_RESET_URL_PATH );
115115 Assert .assertEquals (expected , result );
116116 }
117117
0 commit comments