Skip to content

Commit

Permalink
fix(tests): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgabelle committed Nov 4, 2024
1 parent d1c3000 commit 5754078
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/kestra/plugin/redis/string/Set.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public class Set extends AbstractRedisConnection implements RunnableTask<Set.Out
title = "Options available when setting a key in Redis.",
description = "See [redis documentation](https://redis.io/commands/set/)."
)
@Builder.Default
private Property<Options> options = Property.of(Options.builder().build());
private Property<Options> options;

@Schema(
title = "Define if you get the older value in response, does not work with Redis 5.X."
Expand All @@ -84,7 +83,8 @@ public Output run(RunContext runContext) throws Exception {
try (RedisFactory factory = this.redisFactory(runContext)) {
String oldValue = factory.set(
runContext.render(key).as(String.class).orElseThrow(),
runContext.render(serdeType).as(SerdeType.class).orElseThrow().serialize(runContext.render(value)),
runContext.render(serdeType).as(SerdeType.class).orElseThrow()
.serialize(runContext.render(value).as(String.class).orElseThrow()),
runContext.render(get).as(Boolean.class).orElse(false),
runContext.render(options).as(Options.class).orElse(Options.builder().build()).asRedisSet()
);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/kestra/plugin/redis/PublishTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void testPublishAsList() throws Exception {
Publish task = Publish.builder()
.url(Property.of(REDIS_URI))
.channel(Property.of("mych"))
.from(Property.of(Arrays.asList("value1", "value2")))
.from(Arrays.asList("value1", "value2"))
.build();

Publish.Output runOutput = task.run(runContext);
Expand All @@ -61,7 +61,7 @@ void testPublishAsFile() throws Exception {
Publish task = Publish.builder()
.url(Property.of(REDIS_URI))
.channel(Property.of("mychFile"))
.from(Property.of(uri.toString()))
.from(uri.toString())
.build();

Publish.Output runOutput = task.run(runContext);
Expand Down

0 comments on commit 5754078

Please sign in to comment.