Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.net.URI;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jspecify.annotations.Nullable;
Expand All @@ -31,6 +32,7 @@
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestTemplate;
import reactor.core.publisher.Mono;

Expand Down Expand Up @@ -134,10 +136,10 @@ protected HttpEntity<?> createRequest(InstanceEvent event, Instance instance) {
body.put("alias", generateAlias(instance));
body.put("description", getDescription(event, instance));
if (actions != null) {
body.put("actions", actions);
body.put("actions", List.of(StringUtils.tokenizeToStringArray(actions, ",")));
}
if (tags != null) {
body.put("tags", tags);
body.put("tags", List.of(StringUtils.tokenizeToStringArray(tags, ",")));
}
if (entity != null) {
body.put("entity", entity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package de.codecentric.boot.admin.server.notify;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -63,7 +64,7 @@ void setUp() {
notifier.setUser("--user--");
notifier.setSource("--source--");
notifier.setEntity("--entity--");
notifier.setTags("--tag1--,--tag2--");
notifier.setTags("--tag1--, --tag2--");
notifier.setActions("--action1--,--action2--");
}

Expand Down Expand Up @@ -122,8 +123,8 @@ private HttpEntity<Map<String, Object>> expectedRequest(String expectedOldStatus
expected.put("alias", "App_-id-");
expected.put("description", getDescription(expectedOldStatus, expectedNewStatus));
expected.put("entity", "--entity--");
expected.put("tags", "--tag1--,--tag2--");
expected.put("actions", "--action1--,--action2--");
expected.put("tags", List.of("--tag1--", "--tag2--"));
expected.put("actions", List.of("--action1--", "--action2--"));

Map<String, Object> details = new HashMap<>();
details.put("type", "link");
Expand Down
Loading