Skip to content

Commit

Permalink
feat: multi-tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Oct 13, 2023
1 parent 8a8420a commit 125f541
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/java/io/kestra/plugin/nats/NatsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class NatsTest {
protected StorageInterface storageInterface;

protected List<Map<String, Object>> toMessages(Consume.Output output) throws IOException {
BufferedReader inputStream = new BufferedReader(new InputStreamReader(storageInterface.get(output.getUri())));
BufferedReader inputStream = new BufferedReader(new InputStreamReader(storageInterface.get(null, output.getUri())));
List<Map<String, Object>> result = new ArrayList<>();
FileSerde.reader(inputStream, r -> result.add((Map<String, Object>) r));
return result;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kestra/plugin/nats/ProduceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void produceMultipleMessagesFromInternalStorage() throws Exception {
try (OutputStream outputStream = new FileOutputStream(tempFile)) {
messages.forEach(throwConsumer(message -> FileSerde.write(outputStream, message)));
}
URI uri = storageInterface.put(URI.create("/" + IdUtils.create() + ".ion"), new FileInputStream(tempFile));
URI uri = storageInterface.put(null, URI.create("/" + IdUtils.create() + ".ion"), new FileInputStream(tempFile));

Produce.Output produceOutput = Produce.builder()
.url("localhost:4222")
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kestra/plugin/nats/TriggerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void simpleConsumeTrigger() throws Exception {
Execution execution = triggerFlow();


BufferedReader inputStream = new BufferedReader(new InputStreamReader(storageInterface.get(URI.create((String) execution.getTrigger().getVariables().get("uri")))));
BufferedReader inputStream = new BufferedReader(new InputStreamReader(storageInterface.get(null, URI.create((String) execution.getTrigger().getVariables().get("uri")))));
List<Map<String, Object>> result = new ArrayList<>();
FileSerde.reader(inputStream, r -> result.add((Map<String, Object>) r));

Expand Down

0 comments on commit 125f541

Please sign in to comment.