File tree Expand file tree Collapse file tree
openaev-api/src/test/java/io/openaev/rest/inject/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import com .fasterxml .jackson .databind .node .ObjectNode ;
77import io .openaev .database .model .Agent ;
88import io .openaev .database .model .Inject ;
9+ import io .openaev .rest .inject .form .InjectExecutionAction ;
910import io .openaev .rest .inject .form .InjectExecutionInput ;
1011import io .openaev .service .InjectExpectationService ;
1112import java .util .List ;
@@ -63,7 +64,14 @@ void shouldResolveExecutionContextForInjectorContext() {
6364 void shouldCallProcessContextOnHandlerInProcessInjectExecution () throws Exception {
6465 Inject inject = mock (Inject .class );
6566 Agent agent = mock (Agent .class );
66- InjectExecutionInput input = mock (InjectExecutionInput .class );
67+
68+ InjectExecutionInput input = new InjectExecutionInput ();
69+ String logMessage =
70+ "{\" stdout\" :\" [CVE-2025-25241] [http] [critical] http://seen-ip-endpoint/\\ n[CVE-2025-25002] [http] [critical] http://seen-ip-endpoint/\\ n\" }" ;
71+ input .setMessage (logMessage );
72+ input .setAction (InjectExecutionAction .command_execution );
73+ input .setStatus ("SUCCESS" );
74+
6775 when (handler .supports (any ())).thenReturn (true );
6876 when (handler .processContext (any ())).thenReturn (Optional .of (mock (ObjectNode .class )));
6977 InjectExecutionService spyService = spy (service );
You can’t perform that action at this time.
0 commit comments