Skip to content

Commit e46dc3b

Browse files
committed
fix job service unit test
1 parent b0af72e commit e46dc3b

File tree

2 files changed

+5
-24
lines changed

2 files changed

+5
-24
lines changed

core/src/test/java/com/flowci/core/test/job/JobServiceTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ public class JobServiceTest extends ZookeeperScenario {
124124
@Before
125125
public void mockFlowAndYml() throws IOException {
126126
mockLogin();
127-
flow = flowService.create("hello", new CreateOption());
128-
String yaml = StringHelper.toString(load("flow.yml"));
129-
yml = ymlService.saveYml(flow, Yml.DEFAULT_NAME, yaml);
127+
var yaml = StringHelper.toString(load("flow.yml"));
128+
var option = new CreateOption().setRawYaml(StringHelper.toBase64(yaml));
129+
flow = flowService.create("hello", option);
130+
yml = ymlService.getYml(flow.getId(), Yml.DEFAULT_NAME);
130131
}
131132

132133
@Test
@@ -230,7 +231,7 @@ public void should_finish_whole_job() throws InterruptedException, IOException {
230231
p.setVersion(Version.parse("0.1.1"));
231232
pluginDao.save(p);
232233

233-
String yaml = StringHelper.toString(load("flow-with-notify.yml"));
234+
String yaml = StringHelper.toString(load("flow.yml"));
234235
yml = ymlService.saveYml(flow, Yml.DEFAULT_NAME, yaml);
235236

236237
Agent agent = agentService.create(new AgentOption().setName("hello.agent"));

core/src/test/resources/flow-with-notify.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)