From 9238f266916294fb98b7a82a2ad5dc052c5af268 Mon Sep 17 00:00:00 2001 From: Riccardo Tempesta Date: Sat, 2 Jun 2018 14:58:07 +0200 Subject: [PATCH 1/2] Singular names switched to plural in webapi calls. see https://github.com/magento-engcom/msi/issues/1286 --- .../Api/SourceItemRepository/GetListTest.php | 2 +- .../Test/Api/SourceItemsDeleteTest.php | 2 +- .../Test/Api/SourceItemsSave/SaveTest.php | 2 +- .../Api/SourceItemsSave/ValidationTest.php | 2 +- .../CarrierLinkManagementTest.php | 2 +- .../Test/Api/SourceRepository/CreateTest.php | 2 +- .../Test/Api/SourceRepository/GetListTest.php | 2 +- .../Test/Api/SourceRepository/GetTest.php | 2 +- .../SourceRepository/RegionProcessingTest.php | 2 +- .../Test/Api/SourceRepository/UpdateTest.php | 2 +- .../Api/SourceRepository/ValidationTest.php | 2 +- .../Test/Api/StockRepository/CreateTest.php | 2 +- .../Test/Api/StockRepository/DeleteTest.php | 2 +- .../Test/Api/StockRepository/GetListTest.php | 2 +- .../Test/Api/StockRepository/GetTest.php | 2 +- .../Test/Api/StockRepository/UpdateTest.php | 2 +- .../Api/StockRepository/ValidationTest.php | 2 +- .../GetStockSourceLinksTest.php | 2 +- .../StockSourceLinksDeleteTest.php | 2 +- .../StockSourceLinksSaveTest.php | 2 +- .../Test/Mftf/Metadata/stock-meta.xml | 4 +-- .../Mftf/Metadata/stock-source-link-meta.xml | 2 +- app/code/Magento/InventoryApi/etc/webapi.xml | 32 +++++++++---------- .../Test/Api/GetDefaultStockTest.php | 2 +- .../PreventDefaultStockDeletingTest.php | 2 +- ...PreventAssignSourcesToDefaultStockTest.php | 2 +- ...signedToSalesChannelsStockDeletingTest.php | 2 +- .../SalesChannelManagementTest.php | 2 +- 28 files changed, 44 insertions(+), 44 deletions(-) diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceItemRepository/GetListTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceItemRepository/GetListTest.php index b45ac4453205..6616c02752a8 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceItemRepository/GetListTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceItemRepository/GetListTest.php @@ -19,7 +19,7 @@ class GetListTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source-item'; + const RESOURCE_PATH = '/V1/inventory/source-items'; const SERVICE_NAME = 'inventoryApiSourceItemRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceItemsDeleteTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceItemsDeleteTest.php index 829f5f99cdc8..3553251d9d60 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceItemsDeleteTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceItemsDeleteTest.php @@ -18,7 +18,7 @@ class SourceItemsDeleteTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source-item'; + const RESOURCE_PATH = '/V1/inventory/source-items'; const SERVICE_NAME = 'inventoryApiSourceItemsDeleteV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/SaveTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/SaveTest.php index d0546f361b57..16cf85118e02 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/SaveTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/SaveTest.php @@ -18,7 +18,7 @@ class SaveTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source-item'; + const RESOURCE_PATH = '/V1/inventory/source-items'; const SERVICE_NAME_SAVE = 'inventoryApiSourceItemsSaveV1'; const SERVICE_NAME_DELETE = 'inventoryApiSourceItemsDeleteV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php index 760705fefa2f..19301c76183e 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php @@ -17,7 +17,7 @@ class ValidationTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source-item'; + const RESOURCE_PATH = '/V1/inventory/source-items'; const SERVICE_NAME = 'inventoryApiSourceItemsSaveV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php index 1c5f794ab5cd..e5d5f460c9aa 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php @@ -17,7 +17,7 @@ class CarrierLinkManagementTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CreateTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CreateTest.php index 7862c13da315..1a880d9b39cc 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CreateTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/CreateTest.php @@ -20,7 +20,7 @@ class CreateTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetListTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetListTest.php index b6da46458cc3..063ff81e6835 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetListTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetListTest.php @@ -19,7 +19,7 @@ class GetListTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetTest.php index 4a4d6463df6c..6cc344ef81e4 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/GetTest.php @@ -20,7 +20,7 @@ class GetTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/RegionProcessingTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/RegionProcessingTest.php index a7ffc1959a26..ca702fd30686 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/RegionProcessingTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/RegionProcessingTest.php @@ -18,7 +18,7 @@ class RegionProcessingTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/UpdateTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/UpdateTest.php index 3217deff05e8..d14572094ba1 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/UpdateTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/UpdateTest.php @@ -18,7 +18,7 @@ class UpdateTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/ValidationTest.php b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/ValidationTest.php index 4c39bc61eda6..73036fff1472 100644 --- a/app/code/Magento/InventoryApi/Test/Api/SourceRepository/ValidationTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/SourceRepository/ValidationTest.php @@ -17,7 +17,7 @@ class ValidationTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockRepository/CreateTest.php b/app/code/Magento/InventoryApi/Test/Api/StockRepository/CreateTest.php index 86f1414dd7e9..68d675fcb394 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockRepository/CreateTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockRepository/CreateTest.php @@ -19,7 +19,7 @@ class CreateTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock'; + const RESOURCE_PATH = '/V1/inventory/stocks'; const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockRepository/DeleteTest.php b/app/code/Magento/InventoryApi/Test/Api/StockRepository/DeleteTest.php index 10388543ab94..03e74ad6d8bc 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockRepository/DeleteTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockRepository/DeleteTest.php @@ -16,7 +16,7 @@ class DeleteTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock'; + const RESOURCE_PATH = '/V1/inventory/stocks'; const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetListTest.php b/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetListTest.php index a372f83f5576..2fc305ed324b 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetListTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetListTest.php @@ -19,7 +19,7 @@ class GetListTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock'; + const RESOURCE_PATH = '/V1/inventory/stocks'; const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetTest.php b/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetTest.php index e41e9dc172c8..3eb8e943e6c9 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockRepository/GetTest.php @@ -20,7 +20,7 @@ class GetTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock'; + const RESOURCE_PATH = '/V1/inventory/stocks'; const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockRepository/UpdateTest.php b/app/code/Magento/InventoryApi/Test/Api/StockRepository/UpdateTest.php index 5eb835494fe4..c6d7d75d7e3c 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockRepository/UpdateTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockRepository/UpdateTest.php @@ -17,7 +17,7 @@ class UpdateTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock'; + const RESOURCE_PATH = '/V1/inventory/stocks'; const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockRepository/ValidationTest.php b/app/code/Magento/InventoryApi/Test/Api/StockRepository/ValidationTest.php index 89783ebffd10..bab7d5ce0c2a 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockRepository/ValidationTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockRepository/ValidationTest.php @@ -17,7 +17,7 @@ class ValidationTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock'; + const RESOURCE_PATH = '/V1/inventory/stocks'; const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/GetStockSourceLinksTest.php b/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/GetStockSourceLinksTest.php index 7b256e2cf5d2..205d92f9ae16 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/GetStockSourceLinksTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/GetStockSourceLinksTest.php @@ -19,7 +19,7 @@ class GetStockSourceLinksTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock-source-link'; + const RESOURCE_PATH = '/V1/inventory/stock-source-links'; const SERVICE_NAME = 'inventoryApiGetStockSourceLinksV1'; /**#@-*/ diff --git a/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksDeleteTest.php b/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksDeleteTest.php index 38020f7d6421..44d676413939 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksDeleteTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksDeleteTest.php @@ -18,7 +18,7 @@ class StockSourceLinksDeleteTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock-source-link'; + const RESOURCE_PATH = '/V1/inventory/stock-source-links'; const SERVICE_NAME_SAVE = 'inventoryApiStockSourceLinksSaveV1'; const SERVICE_NAME_DELETE = 'inventoryApiStockSourceLinksDeleteV1'; const SERVICE_NAME_GET_LIST = 'inventoryApiGetStockSourceLinksV1'; diff --git a/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksSaveTest.php b/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksSaveTest.php index 1f0e672cdbd0..3c12d1c24ae9 100644 --- a/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksSaveTest.php +++ b/app/code/Magento/InventoryApi/Test/Api/StockSourceLink/StockSourceLinksSaveTest.php @@ -18,7 +18,7 @@ class StockSourceLinksSaveTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock-source-link'; + const RESOURCE_PATH = '/V1/inventory/stock-source-links'; const SERVICE_NAME_SAVE = 'inventoryApiStockSourceLinksSaveV1'; const SERVICE_NAME_DELETE = 'inventoryApiStockSourceLinksDeleteV1'; const SERVICE_NAME_GET_LIST = 'inventoryApiGetStockSourceLinksV1'; diff --git a/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-meta.xml b/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-meta.xml index 45a01d48212c..ac011fc4a3f8 100644 --- a/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-meta.xml +++ b/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-meta.xml @@ -9,7 +9,7 @@ + auth="adminOauth" url="/V1/inventory/stocks" method="POST"> application/json integer @@ -25,7 +25,7 @@ + auth="adminOauth" url="/V1/inventory/stocks/{return}" method="DELETE"> application/json diff --git a/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-source-link-meta.xml b/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-source-link-meta.xml index de1593b558aa..40e582967426 100644 --- a/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-source-link-meta.xml +++ b/app/code/Magento/InventoryApi/Test/Mftf/Metadata/stock-source-link-meta.xml @@ -8,7 +8,7 @@ - + application/json source-stock-link diff --git a/app/code/Magento/InventoryApi/etc/webapi.xml b/app/code/Magento/InventoryApi/etc/webapi.xml index bfc74ed90f91..a9f67b4438aa 100644 --- a/app/code/Magento/InventoryApi/etc/webapi.xml +++ b/app/code/Magento/InventoryApi/etc/webapi.xml @@ -8,25 +8,25 @@ - + - + - + - + @@ -39,75 +39,75 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultStockTest.php b/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultStockTest.php index 30aaab34d436..8342fedc2ad1 100644 --- a/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultStockTest.php +++ b/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultStockTest.php @@ -34,7 +34,7 @@ public function testGetDefaultSource() $defaultStockId = $this->defaultStockProvider->getId(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/inventory/stock/' . $defaultStockId, + 'resourcePath' => '/V1/inventory/stocks/' . $defaultStockId, 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ diff --git a/app/code/Magento/InventoryCatalog/Test/Api/StockRepository/PreventDefaultStockDeletingTest.php b/app/code/Magento/InventoryCatalog/Test/Api/StockRepository/PreventDefaultStockDeletingTest.php index e25e93acaf22..c9cf378a6f2a 100644 --- a/app/code/Magento/InventoryCatalog/Test/Api/StockRepository/PreventDefaultStockDeletingTest.php +++ b/app/code/Magento/InventoryCatalog/Test/Api/StockRepository/PreventDefaultStockDeletingTest.php @@ -33,7 +33,7 @@ public function testCouldNotDeleteException() { $serviceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/inventory/stock/' . $this->defaultStockProvider->getId(), + 'resourcePath' => '/V1/inventory/stocks/' . $this->defaultStockProvider->getId(), 'httpMethod' => Request::HTTP_METHOD_DELETE, ], 'soap' => [ diff --git a/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php b/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php index 1a04d4486de2..17c07e4bc8e4 100644 --- a/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php +++ b/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php @@ -19,7 +19,7 @@ class PreventAssignSourcesToDefaultStockTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH_ASSIGN_SOURCES_TO_STOCK = '/V1/inventory/stock-source-link'; + const RESOURCE_PATH_ASSIGN_SOURCES_TO_STOCK = '/V1/inventory/stock-source-links'; const SERVICE_NAME_ASSIGN_SOURCES_TO_STOCK = 'inventoryApiStockSourceLinksSaveV1'; /**#@-*/ diff --git a/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/PreventAssignedToSalesChannelsStockDeletingTest.php b/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/PreventAssignedToSalesChannelsStockDeletingTest.php index f3414956a796..851533b6d329 100644 --- a/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/PreventAssignedToSalesChannelsStockDeletingTest.php +++ b/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/PreventAssignedToSalesChannelsStockDeletingTest.php @@ -22,7 +22,7 @@ public function testCouldNotDeleteException() $stockId = 10; $serviceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/inventory/stock/' . $stockId, + 'resourcePath' => '/V1/inventory/stocks/' . $stockId, 'httpMethod' => Request::HTTP_METHOD_DELETE, ], 'soap' => [ diff --git a/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php b/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php index e680d68b4f9c..dec504f47ea7 100644 --- a/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php +++ b/app/code/Magento/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php @@ -18,7 +18,7 @@ class SalesChannelManagementTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stock'; + const RESOURCE_PATH = '/V1/inventory/stocks'; const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ From 7ae8e231cc68b4690e80b23011662e2d32971537 Mon Sep 17 00:00:00 2001 From: Riccardo Tempesta Date: Thu, 14 Jun 2018 19:42:17 +0200 Subject: [PATCH 2/2] FIX wrong URL with singular names --- .../Magento/InventoryApi/Test/Mftf/Metadata/source-meta.xml | 4 ++-- .../InventoryCatalog/Test/Api/GetDefaultSourceTest.php | 2 +- .../PreventAssignSourcesToDefaultStockTest.php | 4 ---- .../Test/Api/PreventDefaultSourceDisablingTest.php | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/InventoryApi/Test/Mftf/Metadata/source-meta.xml b/app/code/Magento/InventoryApi/Test/Mftf/Metadata/source-meta.xml index 01de3a6bc5c4..bb529560ab93 100644 --- a/app/code/Magento/InventoryApi/Test/Mftf/Metadata/source-meta.xml +++ b/app/code/Magento/InventoryApi/Test/Mftf/Metadata/source-meta.xml @@ -9,7 +9,7 @@ + auth="adminOauth" url="/V1/inventory/sources" method="POST"> application/json string @@ -32,7 +32,7 @@ + auth="adminOauth" url="/V1/inventory/sources/{source_code}" method="DELETE"> application/json diff --git a/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultSourceTest.php b/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultSourceTest.php index ebe7a75520e7..43cb83320c22 100644 --- a/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultSourceTest.php +++ b/app/code/Magento/InventoryCatalog/Test/Api/GetDefaultSourceTest.php @@ -34,7 +34,7 @@ public function testGetDefaultSource() $defaultSourceCode = $this->defaultSourceProvider->getCode(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/inventory/source/' . $defaultSourceCode, + 'resourcePath' => '/V1/inventory/sources/' . $defaultSourceCode, 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ diff --git a/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php b/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php index 17c07e4bc8e4..dbb00b92c48e 100644 --- a/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php +++ b/app/code/Magento/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php @@ -102,10 +102,6 @@ public function dataProviderWrongParameters(): array 'message' => 'Can not save link related to Default Source or Default Stock', 'parameters' => [], ], - [ - 'message' => 'Can not save link related to Default Source or Default Stock', - 'parameters' => [], - ], ], ], ], diff --git a/app/code/Magento/InventoryCatalogApi/Test/Api/PreventDefaultSourceDisablingTest.php b/app/code/Magento/InventoryCatalogApi/Test/Api/PreventDefaultSourceDisablingTest.php index 2b1ba5ac4835..1156281e68a9 100644 --- a/app/code/Magento/InventoryCatalogApi/Test/Api/PreventDefaultSourceDisablingTest.php +++ b/app/code/Magento/InventoryCatalogApi/Test/Api/PreventDefaultSourceDisablingTest.php @@ -19,7 +19,7 @@ class PreventDefaultSourceDisablingTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/source'; + const RESOURCE_PATH = '/V1/inventory/sources'; const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/