Skip to content

Commit

Permalink
Merge pull request #479 from loicmathieu/fix/local-run
Browse files Browse the repository at this point in the history
Allow running the IT locally
  • Loading branch information
loicmathieu authored Aug 10, 2023
2 parents b32cc2d + e491f4f commit 00ef694
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class TopicManager {
boolean useEmulator;

@ConfigProperty(name = "quarkus.google.cloud.pubsub.emulator-host")
String emulatorHost;
Optional<String> emulatorHost;

private TopicName topicName;
private Optional<TransportChannelProvider> channelProvider;
Expand All @@ -42,7 +42,7 @@ void init() {
this.topicName = TopicName.of(projectId, "test-topic");

if (useEmulator) {
ManagedChannel channel = ManagedChannelBuilder.forTarget(emulatorHost).usePlaintext().build();
ManagedChannel channel = ManagedChannelBuilder.forTarget(emulatorHost.get()).usePlaintext().build();
channelProvider = Optional.of(FixedTransportChannelProvider.create(GrpcTransportChannel.create(channel)));
} else {
channelProvider = Optional.empty();
Expand Down
19 changes: 10 additions & 9 deletions integration-tests/main/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
my.database.password=${sm//integration-test}

## Logging config
%test.quarkus.google.cloud.logging.default-log=test
%test.quarkus.google.cloud.logging.default-label.app=test
%test.quarkus.google.cloud.logging.resource.type=generic_node
%test.quarkus.google.cloud.logging.resource.label.location=eu-north1
%test.quarkus.google.cloud.logging.resource.label.namespace=test-nodes
%test.quarkus.google.cloud.logging.resource.label.node_id=192.168.0.2
%test.quarkus.google.cloud.logging.structured.stack-trace.included=true
%test.quarkus.google.cloud.logging.gcp-tracing.enabled=false
%test.quarkus.google.cloud.logging.format=json
%dev.quarkus.google.cloud.logging.enabled=false
quarkus.google.cloud.logging.default-log=test
quarkus.google.cloud.logging.default-label.app=test
quarkus.google.cloud.logging.resource.type=generic_node
quarkus.google.cloud.logging.resource.label.location=eu-north1
quarkus.google.cloud.logging.resource.label.namespace=test-nodes
quarkus.google.cloud.logging.resource.label.node_id=192.168.0.2
quarkus.google.cloud.logging.structured.stack-trace.included=true
quarkus.google.cloud.logging.gcp-tracing.enabled=false
quarkus.google.cloud.logging.format=json

0 comments on commit 00ef694

Please sign in to comment.