Skip to content

Commit ab5a3ad

Browse files
committed
--create-app change to integ tests
1 parent bb3f337 commit ab5a3ad

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

integration-tests/src/test/java/com/fnproject/fn/integrationtest/FlowTest.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public class FlowTest {
2626
public void shouldInvokeBasicFlow() throws Exception {
2727
IntegrationTestRule.TestContext tc = testRule.newTest();
2828
tc.withDirFrom("funcs/flowBasic").rewritePOM();
29-
tc.runFn("--verbose", "create", "app", tc.appName());
30-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
29+
// tc.runFn("--verbose", "create", "app", tc.appName());
30+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
3131
tc.runFn("config", "app", tc.appName(), "COMPLETER_BASE_URL", testRule.getFlowURL());
3232
CmdResult r = tc.runFnWithInput("1", "invoke", tc.appName(), "flowbasic");
3333
assertThat(r.getStdout()).isEqualTo("4");
@@ -38,8 +38,8 @@ public void shouldInvokeBasicFlow() throws Exception {
3838
public void shouldInvokeBasicFlowJDK8() throws Exception {
3939
IntegrationTestRule.TestContext tc = testRule.newTest();
4040
tc.withDirFrom("funcs/flowBasicJDK8").rewritePOM();
41-
tc.runFn("--verbose", "create", "app", tc.appName());
42-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
41+
//tc.runFn("--verbose", "create", "app", tc.appName());
42+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
4343
tc.runFn("config", "app", tc.appName(), "COMPLETER_BASE_URL", testRule.getFlowURL());
4444
CmdResult r = tc.runFnWithInput("1", "invoke", tc.appName(), "flowbasicj8");
4545
assertThat(r.getStdout()).isEqualTo("4");
@@ -50,8 +50,8 @@ public void shouldInvokeBasicFlowJDK8() throws Exception {
5050
public void shouldExerciseAllFlow() throws Exception {
5151
IntegrationTestRule.TestContext tc = testRule.newTest();
5252
tc.withDirFrom("funcs/flowAllFeatures").rewritePOM();
53-
tc.runFn("--verbose", "create", "app", tc.appName());
54-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
53+
//tc.runFn("--verbose", "create", "app", tc.appName());
54+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
5555
tc.runFn("config", "app", tc.appName(), "COMPLETER_BASE_URL", testRule.getFlowURL());
5656
CmdResult r = tc.runFnWithInput("1", "invoke", tc.appName(), "flowallfeatures");
5757
assertThat(r.getStdout()).contains("Everything worked");
@@ -76,8 +76,8 @@ public void shouldCallExitHooks() throws Exception {
7676
IntegrationTestRule.TestContext tc = testRule.newTest();
7777
tc.withDirFrom("funcs/flowExitHooks").rewritePOM();
7878
tc.runFn("--verbose", "build", "--no-cache");
79-
80-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
79+
//tc.runFn("--verbose", "create", "app", tc.appName());
80+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
8181
tc.runFn("config", "app", tc.appName(), "COMPLETER_BASE_URL", testRule.getFlowURL());
8282
tc.runFn("config", "app", tc.appName(), "TERMINATION_HOOK_URL", "http://" + testRule.getDockerLocalhost() + ":" + 8000 + "/exited");
8383
CmdResult r = tc.runFnWithInput("1", "invoke", tc.appName(), "flowexithooks");
@@ -95,7 +95,8 @@ public void shouldCallExitHooks() throws Exception {
9595
public void shouldHandleTimeouts() throws Exception {
9696
IntegrationTestRule.TestContext tc = testRule.newTest();
9797
tc.withDirFrom("funcs/flowTimeouts").rewritePOM();
98-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
98+
//tc.runFn("--verbose", "create", "app", tc.appName());
99+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
99100
tc.runFn("config", "app", tc.appName(), "COMPLETER_BASE_URL", testRule.getFlowURL());
100101
CmdResult r = tc.runFn("invoke", tc.appName(), "flowtimeouts");
101102
assertThat(r.getStdout()).contains("timeout");

integration-tests/src/test/java/com/fnproject/fn/integrationtest/FunctionsTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public void shouldCallExistingFn() throws Exception {
3232
IntegrationTestRule.TestContext tc = testRule.newTest();
3333
tc.withDirFrom("funcs/simpleFunc").rewritePOM();
3434

35-
tc.runFn("--verbose", "create", "app", tc.appName());
36-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
35+
//tc.runFn("--verbose", "create", "app", tc.appName());
36+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
3737
tc.runFn("config", "app", tc.appName(), "GREETING", "Salutations");
3838

3939
CmdResult r1 = tc.runFnWithInput("", "invoke", tc.appName(), "simplefunc");
@@ -48,11 +48,11 @@ public void shouldCallExistingFn() throws Exception {
4848
public void checkBoilerPlate() throws Exception {
4949
for (String runtime : new String[]{"java8", "java11"}) {
5050
IntegrationTestRule.TestContext tc = testRule.newTest();
51-
tc.runFn("--verbose", "create", "app", tc.appName());
51+
//tc.runFn("--verbose", "create", "app", tc.appName());
5252
String fnName = "bp" + runtime;
5353
tc.runFn("init", "--runtime", runtime, "--name", fnName);
5454
tc.rewritePOM();
55-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
55+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
5656
CmdResult rs = tc.runFnWithInput("wibble", "invoke", tc.appName(), fnName);
5757
assertThat(rs.getStdout()).contains("Hello, wibble!");
5858
}
@@ -68,8 +68,8 @@ public static class InspectResponse {
6868
public void shouldHandleTrigger() throws Exception {
6969
IntegrationTestRule.TestContext tc = testRule.newTest();
7070
tc.withDirFrom("funcs/httpgwfunc").rewritePOM();
71-
tc.runFn("--verbose", "create", "app", tc.appName());
72-
tc.runFn("--verbose", "deploy", "--app", tc.appName(), "--local");
71+
//tc.runFn("--verbose", "create", "app", tc.appName());
72+
tc.runFn("--verbose", "deploy", "--create-app", "--app", tc.appName(), "--local");
7373

7474
// Get me the trigger URL
7575
CmdResult output = tc.runFn("inspect", "trigger", tc.appName(), "httpgwfunc", "trig");

0 commit comments

Comments
 (0)