Conversation
| Then Validate record created in Sink application for Single object is equal to expected output file | ||
|
|
||
| @TS-ZD-RNTM-MACRO-02 @BQ_SINK @BQ_SINK_CLEANUP @FILE_PATH | ||
| @TS-ZD-RNTM-MACRO-02 @BQ_SINK @BQ_SINK_CLEANUP @TEST_DATA @DELETE_TEST_DATA |
There was a problem hiding this comment.
Hook's value is @CREATE_GROUP I guess you have used a wrong one here.
| Feature: Zendesk Source - Run time scenarios | ||
|
|
||
| @TS-ZD-RNTM-MACRO-01 @BQ_SINK @BQ_SINK_CLEANUP @FILE_PATH | ||
| @TS-ZD-RNTM-MACRO-01 @BQ_SINK @BQ_SINK_CLEANUP @TEST_DATA @DELETE_TEST_DATA |
There was a problem hiding this comment.
Hook's value is @CREATE_GROUP, update the value here.
| */ | ||
| public class TestSetupHooks { | ||
| private static boolean firstFileSinkTestFlag = true; | ||
| public static String testdata_Group = ""; |
There was a problem hiding this comment.
use camel case in the naming instead of underscore. (testdata_Group -> groupResponse)
| public class TestSetupHooks { | ||
| private static boolean firstFileSinkTestFlag = true; | ||
| public static String testdata_Group = ""; | ||
| public static String cred = ""; |
There was a problem hiding this comment.
change cred -> credentials
| public void deleteGroup() { | ||
| DataValidationHelper.deleteGroup(cred); | ||
| } | ||
| } |
| * Zendesk utility - enhancements. | ||
| */ | ||
| public class DataValidationHelper { | ||
| private static String baseURI = "https://cloudsufi.zendesk.com/api/v2"; |
There was a problem hiding this comment.
We can put this base URI in the plugin parameter properties file.
| .header("authorization", cred) | ||
| .delete(baseURI + "/groups/" + ZendeskPropertiesPageActions.uniqueId + ".json"); | ||
| } | ||
| } |
| BigInteger uniqueId = expectedOutputAsJson.get("id").getAsBigInteger(); | ||
| JsonObject expectedOutputAsJson = gson.fromJson(TestSetupHooks.testdata_Group, JsonObject.class); | ||
| JsonObject group = (JsonObject) expectedOutputAsJson.get("group"); | ||
| System.out.println(group); |
There was a problem hiding this comment.
remove System.out.println()
| } | ||
|
|
||
|
|
||
| public static void verifyIfRecordCreatedInSinkForMultipleObjectsAreCorrect(String expectedOutputFile) |
There was a problem hiding this comment.
Revert all the spacing related changes in this method.
| return mapDifference.areEqual(); | ||
| } | ||
|
|
||
| public static void getBigQueryTableData(String dataset, String table, BigInteger uniqueId) |
There was a problem hiding this comment.
We have written the altered query here specifically for groups but this method getBigQueryTableData is common and can be used to fetch data from any big query table, this will throw an error if the table consist data of another object. (For ex: Tags may not have field like updatedAt and createdAt).
There was a problem hiding this comment.
The objects we are using : Groups and Organisations , both have the same fields.
|
|
||
| private static final String MOCK_STAGE = "mockStage"; | ||
| private static MockPipelineConfigurer pipelineConfigurer = null; | ||
| private static MockPipelineConfigurer pipelineConfigure = null; |
There was a problem hiding this comment.
revert this change, not related to Automation.
| ZendeskBatchSource zendeskBatchSource = new ZendeskBatchSource(config); | ||
| pipelineConfigurer = new MockPipelineConfigurer(null); | ||
| zendeskBatchSource.configurePipeline(pipelineConfigurer); | ||
| pipelineConfigure = new MockPipelineConfigurer(null); |
| ZendeskBatchMultiSource zendeskBatchMultiSource = new ZendeskBatchMultiSource(config); | ||
| pipelineConfigurer = new MockPipelineConfigurer(null); | ||
| zendeskBatchMultiSource.configurePipeline(pipelineConfigurer); | ||
| pipelineConfigure = new MockPipelineConfigurer(null); |
230dd4e to
3833653
Compare
No description provided.