You should be able to do this:
./gradlew :sdks:java:io:google-cloud-platform:integrationTest \
--tests "org.apache.beam.sdk.io.gcp.healthcare.HL7v2IOReadIT" \
-PgcpProject='jferriero-dev'
This should apply to most other GCP-dependent tests as well.
On Mon, Apr 6, 2020 at 9:05 PM Jacob Ferriero <[email protected]> wrote:
> Hi Dev list,
>
> I'm wondering how to specify a runtime argument for `TestingPipeline` for
> integration tests (namely a GCP project id) in order to test against
> resources in my own project rather than "apache-beam-testing".
>
> In my integration test class I use:
> ```java
> String project =
> TestPipeline.testingPipelineOptions().as(GcpOptions.class).getProject();
> ```
>
> And my invocation looks like this:
> ```bash
> ./gradlew :sdks:java:io:google-cloud-platform:integrationTest \
> --tests "org.apache.beam.sdk.io.gcp.healthcare.HL7v2IOReadIT" \
> -PintegrationTest.args='--project=jferriero-dev'
> ```
>
> However project always seems to default to "apache-beam-testing".
> Is there a better / different way to pass this parameters?
> Should I just hard code project locally and remember to change later?
>
> Cheers,
>
> *Jacob Ferriero*
>
> Strategic Cloud Engineer: Data Engineering
>
> [email protected]
>
> 617-714-2509 <(617)%20714-2509>
>