From b637db3e4d4209314e8d734c34196c642dbd5ad9 Mon Sep 17 00:00:00 2001 From: Adam Kliment Date: Mon, 28 Dec 2015 21:24:39 -0800 Subject: [PATCH] Trying all CLI integration tests --- test/fixtures/scripts/endless-sigterm.sh | 12 ++++++++++++ test/integration/cli-test.coffee | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 test/fixtures/scripts/endless-sigterm.sh diff --git a/test/fixtures/scripts/endless-sigterm.sh b/test/fixtures/scripts/endless-sigterm.sh new file mode 100755 index 000000000..176fa49d9 --- /dev/null +++ b/test/fixtures/scripts/endless-sigterm.sh @@ -0,0 +1,12 @@ +#!/bin/bash +function term() { + echo 'Caught SIGNTERM, exiting.' + exit 0 +} + +trap 'term' SIGTERM + +while true +do +sleep 0.1 +done diff --git a/test/integration/cli-test.coffee b/test/integration/cli-test.coffee index a6664914b..876f18edf 100644 --- a/test/integration/cli-test.coffee +++ b/test/integration/cli-test.coffee @@ -42,7 +42,7 @@ execCommand = (cmd, options = {}, callback) -> callback(undefined, stdout, stderr, exitStatus) -describe "Command line interface", () -> +describe.only "Command line interface", () -> describe "When blueprint file not found", -> before (done) -> @@ -383,7 +383,7 @@ describe "Command line interface", () -> it 'should return message annoucing the fact', () -> assert.include stderr, 'killed' - it.only 'should term or kill the server', () -> + it 'should term or kill the server', () -> console.log stdout console.log stderr assert.isFalse isProcessRunning("endless-nosigterm")