From 16ecaa0ac8eb758bba68f8cbf10451aec88de757 Mon Sep 17 00:00:00 2001 From: patrickmann Date: Thu, 14 Nov 2024 12:43:16 +0100 Subject: [PATCH] adjust tests --- .../system/inputs/InputsResourceMaskingPasswordsTest.java | 3 ++- .../rest/resources/system/inputs/InputsResourceTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceMaskingPasswordsTest.java b/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceMaskingPasswordsTest.java index fb9a25faa9e0..e6617c1d77db 100644 --- a/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceMaskingPasswordsTest.java +++ b/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceMaskingPasswordsTest.java @@ -22,6 +22,7 @@ import org.graylog2.Configuration; import org.graylog2.database.NotFoundException; import org.graylog2.inputs.Input; +import org.graylog2.inputs.InputDiagnosticService; import org.graylog2.inputs.InputService; import org.graylog2.plugin.configuration.ConfigurationRequest; import org.graylog2.plugin.configuration.fields.ConfigurationField; @@ -67,7 +68,7 @@ public class InputsResourceMaskingPasswordsTest { class InputsTestResource extends InputsResource { public InputsTestResource(InputService inputService, MessageInputFactory messageInputFactory) { - super(inputService, messageInputFactory, new Configuration()); + super(inputService, mock(InputDiagnosticService.class), messageInputFactory, new Configuration()); } @Override diff --git a/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceTest.java b/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceTest.java index b2f40b123f53..6a5ae2876f5e 100644 --- a/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceTest.java +++ b/graylog2-server/src/test/java/org/graylog2/rest/resources/system/inputs/InputsResourceTest.java @@ -20,6 +20,7 @@ import jakarta.ws.rs.BadRequestException; import org.graylog2.Configuration; import org.graylog2.configuration.HttpConfiguration; +import org.graylog2.inputs.InputDiagnosticService; import org.graylog2.inputs.InputService; import org.graylog2.plugin.database.users.User; import org.graylog2.plugin.inputs.MessageInput; @@ -116,7 +117,7 @@ static class InputsTestResource extends InputsResource { public InputsTestResource(InputService inputService, MessageInputFactory messageInputFactory, Configuration config) { - super(inputService, messageInputFactory, config); + super(inputService, mock(InputDiagnosticService.class), messageInputFactory, config); configuration = mock(HttpConfiguration.class); this.user = mock(User.class); lenient().when(user.getName()).thenReturn("foo");