Skip to content

Commit

Permalink
minor tweak + integration test. fixes #4369
Browse files Browse the repository at this point in the history
  • Loading branch information
bamaer committed Jan 18, 2025
1 parent 77e9a33 commit 70b35de
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 0 deletions.
194 changes: 194 additions & 0 deletions integration-tests/http/0017-rest-metadata-type.hpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<pipeline>
<info>
<name>0017-rest-metadata-type</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<pipeline_status>0</pipeline_status>
<parameters>
<parameter>
<name>HOSTNAME</name>
<default_value>localhost</default_value>
<description/>
</parameter>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/01/18 10:07:08.642</created_date>
<modified_user>-</modified_user>
<modified_date>2025/01/18 10:07:08.642</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Generate rows</from>
<to>REST client</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>check result</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>REST client</from>
<to>check result</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
<type>Abort</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<abort_option>ABORT_WITH_ERROR</abort_option>
<always_log_rows>Y</always_log_rows>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
<name>Generate rows</name>
<type>RowGenerator</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
</fields>
<interval_in_ms>5000</interval_in_ms>
<last_time_field>FiveSecondsAgo</last_time_field>
<limit>1</limit>
<never_ending>N</never_ending>
<row_time_field>now</row_time_field>
<attributes/>
<GUI>
<xloc>192</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
<name>REST client</name>
<type>Rest</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<applicationType>TEXT PLAIN</applicationType>
<bodyField/>
<connectionTimeout/>
<connection_name>castlemock</connection_name>
<dynamicMethod>N</dynamicMethod>
<headers>
</headers>
<httpLogin/>
<httpPassword>Encrypted </httpPassword>
<ignoreSsl>N</ignoreSsl>
<matrixParameters>
</matrixParameters>
<method>GET</method>
<methodFieldName/>
<parameters>
</parameters>
<preemptive>N</preemptive>
<proxyHost/>
<proxyPort/>
<readTimeout/>
<result>
<code>result_code</code>
<name>result</name>
<response_header>response_header</response_header>
<response_time>response_ms</response_time>
</result>
<trustStoreFile/>
<trustStorePassword>Encrypted </trustStorePassword>
<url>/get</url>
<urlField/>
<urlInField>N</urlInField>
<attributes/>
<GUI>
<xloc>352</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
<name>check result</name>
<type>FilterRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<compare>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>result_code</leftvalue>
<negated>Y</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<mask>#</mask>
<name>constant</name>
<precision>0</precision>
<text>200</text>
<type>Integer</type>
</value>
</condition>
</compare>
<attributes/>
<GUI>
<xloc>512</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>
97 changes: 97 additions & 0 deletions integration-tests/http/main-0017-rest-metadata-type.hwf
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<workflow>
<name>main-0017-rest-metadata-type</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<workflow_version/>
<created_user>-</created_user>
<created_date>2025/01/18 10:06:40.272</created_date>
<modified_user>-</modified_user>
<modified_date>2025/01/18 10:06:40.272</modified_date>
<parameters>
</parameters>
<actions>
<action>
<name>Start</name>
<description/>
<type>SPECIAL</type>
<attributes/>
<DayOfMonth>1</DayOfMonth>
<hour>12</hour>
<intervalMinutes>60</intervalMinutes>
<intervalSeconds>0</intervalSeconds>
<minutes>0</minutes>
<repeat>N</repeat>
<schedulerType>0</schedulerType>
<weekDay>1</weekDay>
<parallel>N</parallel>
<xloc>50</xloc>
<yloc>50</yloc>
<attributes_hac/>
</action>
<action>
<name>0017-rest-metadata-type.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/0017-rest-metadata-type.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<parameter>
<name>HOSTNAME</name>
<stream_name/>
<value>${HOSTNAME}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>256</xloc>
<yloc>64</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>Start</from>
<to>0017-rest-metadata-type.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
</hops>
<notepads>
</notepads>
<attributes/>
</workflow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"auth_header_value": "",
"auth_header_name": "",
"virtualPath": "",
"auth_header_prefix": "",
"base_url": "http://${HOSTNAME}",
"name": "castlemock",
"test_url": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,8 @@ private void ok() {

if (!Utils.isEmpty(wSelectionLine.getText())) {
input.setConnectionName(wSelectionLine.getText());
} else {
input.setConnectionName("");
}

input.getHeaderFields().clear();
Expand Down

0 comments on commit 70b35de

Please sign in to comment.