From 0d65ed26fc5951771cb6a8e4c563f39a87a97d66 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Wed, 18 May 2016 09:52:48 -0500 Subject: [PATCH 1/7] Add a randomly failing release phase --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 4237dd23b3..4fcb855b05 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ web: node index.js - +release: exit $(($RANDOM % 2)) From 60df06b3b78501cc1e743401f1279ae7e316ccac Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 7 May 2018 14:41:46 -0500 Subject: [PATCH 2/7] Slow down release phase --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 4fcb855b05..2f75779922 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ web: node index.js -release: exit $(($RANDOM % 2)) +release: sleep 10 && exit $(($RANDOM % 2)) From 78993a7f59e7480b23825d7bd72d41d1704d9a13 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 7 May 2018 14:43:44 -0500 Subject: [PATCH 3/7] Add release output --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 2f75779922..500cfa43a5 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ web: node index.js -release: sleep 10 && exit $(($RANDOM % 2)) +release: echo "making pizza...." && sleep 10 && echo "🍕" && exit $(($RANDOM % 2)) From e87b085153b789b038c055e81b3cfc8ba733e02c Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 7 May 2018 14:51:11 -0500 Subject: [PATCH 4/7] Don't fail release phase --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 500cfa43a5..397ed41c14 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ web: node index.js -release: echo "making pizza...." && sleep 10 && echo "🍕" && exit $(($RANDOM % 2)) +release: echo "making pizza...." && sleep 10 && echo "🍕" From 2d7f0abe4f73bbcf47d94c4208cfa52cb3671502 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Wed, 24 Jul 2019 16:40:34 -0500 Subject: [PATCH 5/7] Add some tests that log --- app.json | 5 ++++- bin/test | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 bin/test diff --git a/app.json b/app.json index 061d81f810..8ba2a4e794 100644 --- a/app.json +++ b/app.json @@ -3,5 +3,8 @@ "description": "A barebones Node.js app using Express 4", "repository": "https://github.com/heroku/node-js-sample", "logo": "http://node-js-sample.herokuapp.com/node.svg", - "keywords": ["node", "express", "static"] + "keywords": ["node", "express", "static"], + "scripts": { + "test": "./bin/test" + } } diff --git a/bin/test b/bin/test new file mode 100755 index 0000000000..53a33f1552 --- /dev/null +++ b/bin/test @@ -0,0 +1,6 @@ +#!/bin/bash +echo "Running Tests" +for i in {0..1000000..1} + do + echo "ok $i - test passed 🤖" + done From dd97acf92277b7f601bf8d4d73f2e45a25bbace7 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Wed, 24 Jul 2019 16:45:56 -0500 Subject: [PATCH 6/7] more tests --- app.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index 8ba2a4e794..5817e5c50c 100644 --- a/app.json +++ b/app.json @@ -4,7 +4,16 @@ "repository": "https://github.com/heroku/node-js-sample", "logo": "http://node-js-sample.herokuapp.com/node.svg", "keywords": ["node", "express", "static"], - "scripts": { - "test": "./bin/test" + "environments": { + "test": { + "formation": { + "test": { + "quantity": 16 + } + }, + "scripts": { + "test": "./bin/test" + } + } } } From af811e3eebd5b511634d04a5c4eb944a52d1cc7c Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Wed, 24 Jul 2019 17:02:01 -0500 Subject: [PATCH 7/7] Add more logs --- bin/test | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/test b/bin/test index 53a33f1552..ea7890fbf9 100755 --- a/bin/test +++ b/bin/test @@ -1,6 +1,11 @@ #!/bin/bash -echo "Running Tests" -for i in {0..1000000..1} +echo "Running Tests..." +for i in {1..100000} do - echo "ok $i - test passed 🤖" + echo "ok $((i*10)) - test passed 🤖" + echo "not ok $((i*10+1)) - Something broke" + echo " # It's really borked" + echo "[Object object] { 💥 🤯 }" + echo "ok $((i*10+2))" + echo "pending $((i*10+3)) - stop faking tests" done