forked from opensearch-project/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'opensearch-project:main' into openSearch-sink-configura…
…tion-changes
- Loading branch information
Showing
100 changed files
with
4,301 additions
and
10,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: kinesis-source-integration-tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'data-prepper-plugins/kinesis-source/**' | ||
- '*gradle*' | ||
pull_request: | ||
paths: | ||
- 'data-prepper-plugins/kinesis-source/**' | ||
- '*gradle*' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
java: [ 11, 17, 21, docker ] | ||
fail-fast: false | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Git clone the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: configure aws credentials | ||
id: creds | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.TEST_IAM_ROLE_ARN }} | ||
aws-region: ${{ secrets.TEST_REGION }} | ||
output-credentials: true | ||
|
||
- name: get caller identity 1 | ||
run: | | ||
aws sts get-caller-identity | ||
- name: Configure AWS Credentials file | ||
run: | | ||
aws configure set default.region ${{ secrets.TEST_REGION }} | ||
aws configure set default.aws_access_key_id ${{ steps.creds.outputs.aws-access-key-id }} | ||
aws configure set default.aws_secret_access_key ${{ steps.creds.outputs.aws-secret-access-key }} | ||
aws configure set default.aws_session_token ${{ steps.creds.outputs.aws-session-token }} | ||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Checkout Data Prepper | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run Kinesis Source integration tests | ||
run: | | ||
./gradlew data-prepper-plugins:kinesis-source:integrationTest \ | ||
-Dtests.kinesis.source.aws.region=us-east-1 --tests KinesisSourceIT | ||
- name: Upload Unit Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: data-prepper-kinesis-source-integration-tests-java-${{ matrix.java }} | ||
path: '**/test-results/**/*.xml' | ||
|
||
publish-test-results: | ||
name: "Publish Unit Tests Results" | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: always() | ||
|
||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: test-results | ||
|
||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
with: | ||
files: "test-results/**/*.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...r-api/src/main/java/org/opensearch/dataprepper/expression/ExpressionParsingException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.expression; | ||
|
||
/** | ||
* @since 2.11 | ||
* Wrapper exception for any exception thrown while evaluating a statement | ||
*/ | ||
public class ExpressionParsingException extends ExpressionEvaluationException { | ||
public ExpressionParsingException(final String message, final Throwable cause) { | ||
super(message, cause); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...i/src/test/java/org/opensearch/dataprepper/expression/ExpressionParsingExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* | ||
* * Copyright OpenSearch Contributors | ||
* * SPDX-License-Identifier: Apache-2.0 | ||
* | ||
*/ | ||
|
||
package org.opensearch.dataprepper.expression; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.UUID; | ||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
|
||
class ExpressionParsingExceptionTest { | ||
|
||
@Test | ||
void testExpressionParsingException() { | ||
final ExpressionParsingException exception = new ExpressionParsingException(UUID.randomUUID().toString(), null); | ||
assertThat(exception instanceof RuntimeException, is(true)); | ||
} | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
data-prepper-api/src/test/java/org/opensearch/dataprepper/model/processor/ProcessorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.model.processor; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import static org.hamcrest.CoreMatchers.equalTo; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.when; | ||
|
||
public class ProcessorTest { | ||
|
||
@Test | ||
public void testDefault() { | ||
Processor processor = mock(Processor.class); | ||
when(processor.holdsEvents()).thenCallRealMethod(); | ||
assertThat(processor.holdsEvents(), equalTo(false)); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.