Skip to content

Commit c5f5dac

Browse files
committed
magento-engcom/bulk-api#4 Support for Async operations in WebAPI
- Fixed integration tests
1 parent 3731bf9 commit c5f5dac

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

dev/tests/integration/testsuite/Magento/Framework/MessageQueue/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ protected function getConfigInstance($configFilePath, $envConfigFilePath = null)
170170
]
171171
);
172172
return $objectManager->create(
173-
\Magento\Framework\MessageQueue\ConfigInterface::class,
173+
\Magento\Framework\MessageQueue\Config::class,
174174
['queueConfigData' => $configData]
175175
);
176176
}

dev/tests/integration/testsuite/Magento/WebapiAsync/Controller/Rest/AsynchronousSchemaRequestProcessorTest.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class AsynchronousSchemaRequestProcessorTest extends AbstractController
1414
* Test that the rest controller returns the correct async schema response.
1515
*
1616
* @param string $path
17+
* @magentoAppArea webapi_rest
1718
* @dataProvider schemaRequestProvider
1819
*/
1920
public function testSchemaRequest($path)
@@ -25,7 +26,20 @@ public function testSchemaRequest($path)
2526
$this->assertRegExp('/202 Accepted/', $schema);
2627

2728
// Make sure that the async interface definition is included in the response.
28-
$this->assertRegExp('/webapi-async-data-async-response-interface/', $schema);
29+
$this->assertRegExp('/asynchronous-operations-data-async-response-interface/', $schema);
30+
}
31+
32+
/**
33+
* Response getter
34+
*
35+
* @return \Magento\Framework\App\ResponseInterface
36+
*/
37+
public function getResponse()
38+
{
39+
if (!$this->_response) {
40+
$this->_response = $this->_objectManager->get(\Magento\Framework\Webapi\Rest\Response::class);
41+
}
42+
return $this->_response;
2943
}
3044

3145
/**

dev/tests/integration/testsuite/Magento/WebapiAsync/Model/Rest/Swagger/GeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testGenerateAsync()
7070

7171
// Ensure that the response type has been replaced with the async version.
7272
$this->assertEquals(
73-
'#/definitions/webapi-async-data-async-response-interface',
73+
'#/definitions/asynchronous-operations-data-async-response-interface',
7474
$schema['paths']['/V1/customers']['post']['responses']['202']['schema']['$ref']
7575
);
7676

dev/tests/integration/testsuite/Magento/WebapiAsync/Plugin/ServiceMetadataTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testGetServiceMetadata()
6060
'out' => [
6161
'parameters' => [
6262
'result' => [
63-
'type' => 'WebapiAsyncDataAsyncResponseInterface',
63+
'type' => 'AsynchronousOperationsDataAsyncResponseInterface',
6464
'required' => true,
6565
'documentation' => 'Returns response information for the asynchronous request.',
6666
'response_codes' => [

0 commit comments

Comments
 (0)