[ Service ] [ Executor ] 修改OctopusObjectMapper

This commit is contained in:
zeaslity
2023-08-11 15:47:54 +08:00
parent 06170c1024
commit 0a78f9a02b
15 changed files with 175 additions and 152 deletions

View File

@@ -5,8 +5,6 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@SpringBootTest
class ServerApplicationTests {
@@ -18,57 +16,7 @@ class ServerApplicationTests {
@Test
void testCoreExecutionCompleteScript() {
ArrayList<String> command1 = new ArrayList<>(
List.of(
"echo",
"yes"
)
);
ArrayList<String> command2 = new ArrayList<>(
List.of(
"apt-get",
"update"
)
);
ArrayList<String> command3 = new ArrayList<>(
List.of(
"echo",
"\"no\""
)
);
ArrayList<String> command4 = new ArrayList<>(
List.of(
"apt-get",
"install",
"nginx",
"-y"
)
);
List<List<String>> completeScript = new ArrayList<>();
completeScript.add(command1);
completeScript.add(command2);
completeScript.add(command3);
completeScript.add(command4);
ArrayList<String> targetMachineList = new ArrayList<>(
List.of(
"Chengdu-amd64-98-98066f"
)
);
List<String> resultList = asyncExecutionService.SyncSendCommandToAgentComplete(
targetMachineList,
"Scheduled Script",
completeScript
);
System.out.println("resultList = " + resultList);
}
}