Skip to content

Commit 736813e

Browse files
committed
checking if env variables are logged out to stdout and stderr, stdout gets redirected to stderr hence the duplication in the assertion
1 parent 5b58491 commit 736813e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

runtime/src/test/java/com/fnproject/fn/runtime/EndToEndInvokeTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ public void shouldReadBytesOnDefaultCodec() throws Exception {
215215
public void shouldPrintLogFrame() throws Exception {
216216
fn.setConfig("FN_LOGFRAME_NAME", "containerID");
217217
fn.setConfig("FN_LOGFRAME_HDR", "fnID");
218-
fn.givenEvent().withHeader("fnID", "uhfieuwfhieuwh").withBody( "Hello world!").enqueue();
218+
fn.givenEvent().withHeader("fnID", "fnIDVal").withBody( "Hello world!").enqueue();
219219

220220
fn.thenRun(TestFn.class, "fnEcho");
221221
assertThat(fn.getOnlyOutputAsString()).isEqualTo("Hello world!");
222-
assertThat(fn.getStdErrAsString()).isEqualTo("");
222+
// stdout gets redirected to stderr - hence printing out twice
223+
assertThat(fn.getStdErrAsString()).isEqualTo("containerID=fnIDVal\ncontainerID=fnIDVal\n");
223224

224225
}
225226

0 commit comments

Comments
 (0)