You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2024/07/23 20:16:05 UTC
(streampipes) branch hotfix-reactivate-mqtt-cypress-test created (now a9ec34a663)
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a change to branch hotfix-reactivate-mqtt-cypress-test
in repository https://gitbox.apache.org/repos/asf/streampipes.git
at a9ec34a663 refactor: Reactivate mqtt cypress test
This branch includes the following new commits:
new a9ec34a663 refactor: Reactivate mqtt cypress test
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(streampipes) 01/01: refactor: Reactivate mqtt cypress test
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch hotfix-reactivate-mqtt-cypress-test
in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit a9ec34a663335f63104732efba0273ab12dc2e81
Author: Philipp Zehnder <te...@users.noreply.github.com>
AuthorDate: Tue Jul 23 22:15:55 2024 +0200
refactor: Reactivate mqtt cypress test
---
docker-compose.yml | 6 ++++++
ui/cypress/support/builder/AdapterBuilder.ts | 2 +-
ui/cypress/tests/thirdparty/{Mqtt.ts => Mqtt.spec.ts} | 14 ++++++++------
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/docker-compose.yml b/docker-compose.yml
index dfb554bc19..9e50df736b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -135,6 +135,12 @@ services:
networks:
spnet:
+ mosquitto:
+ image: eclipse-mosquitto:1.5.4
+ logging: *default-logging
+ networks:
+ spnet:
+
volumes:
kafka:
files:
diff --git a/ui/cypress/support/builder/AdapterBuilder.ts b/ui/cypress/support/builder/AdapterBuilder.ts
index d590d95005..c48e8fc3c8 100644
--- a/ui/cypress/support/builder/AdapterBuilder.ts
+++ b/ui/cypress/support/builder/AdapterBuilder.ts
@@ -92,7 +92,7 @@ export class AdapterBuilder {
}
public setFormat(
- format: 'csv' | 'json' | 'json_array' | 'json_object' | 'xml',
+ format: 'csv' | 'json' | 'json_array' | 'xml',
) {
this.adapterInput.format = format;
return this;
diff --git a/ui/cypress/tests/thirdparty/Mqtt.ts b/ui/cypress/tests/thirdparty/Mqtt.spec.ts
similarity index 78%
rename from ui/cypress/tests/thirdparty/Mqtt.ts
rename to ui/cypress/tests/thirdparty/Mqtt.spec.ts
index 108fca8dbe..fe5f50ef5e 100644
--- a/ui/cypress/tests/thirdparty/Mqtt.ts
+++ b/ui/cypress/tests/thirdparty/Mqtt.spec.ts
@@ -16,10 +16,10 @@
*
*/
-import { GenericAdapterBuilder } from '../../support/builder/AdapterBuilder';
import { PipelineElementBuilder } from '../../support/builder/PipelineElementBuilder';
import { ThirdPartyIntegrationUtils } from '../../support/utils/ThirdPartyIntegrationUtils';
import { PipelineElementInput } from '../../support/model/PipelineElementInput';
+import { AdapterBuilder } from '../../support/builder/AdapterBuilder';
import { ParameterUtils } from '../../support/utils/ParameterUtils';
describe('Test MQTT Integration', () => {
@@ -29,22 +29,24 @@ describe('Test MQTT Integration', () => {
it('Perform Test', () => {
const topicName = 'cypresstopic';
- const host: string = ParameterUtils.get('localhost', 'activemq');
+ const host: string = ParameterUtils.get('localhost', 'mosquitto');
+ const port: string = ParameterUtils.get('1884', '1883');
const sink: PipelineElementInput = PipelineElementBuilder.create(
'mqtt_publisher',
)
.addInput('input', 'host', host)
.addInput('input', 'topic', topicName)
+ .addInput('input', 'port', port)
.build();
- const adapter = GenericAdapterBuilder.create('MQTT')
+ const adapter = AdapterBuilder.create('MQTT')
.setName('Adapter Mqtt')
.setTimestampProperty('timestamp')
- .addProtocolInput('select', 'access-mode-unauthenticated', 'check')
- .addProtocolInput('input', 'broker_url', 'tcp://' + host + ':1883')
+ .addProtocolInput('radio', 'access-mode-unauthenticated', '')
+ .addProtocolInput('input', 'broker_url', `tcp://${host}:${port}`)
.addProtocolInput('input', 'topic', topicName)
- .setFormat('json_object')
+ .setFormat('json')
.build();
ThirdPartyIntegrationUtils.runTest(sink, adapter);