Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smoketest: do full default run against our basic html page. #534

Merged
merged 1 commit into from
Jul 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions lighthouse-cli/scripts/run-smoke-tests.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/usr/bin/env bash

cd lighthouse-cli/test/fixtures && python -m SimpleHTTPServer 9999 &
cd lighthouse-cli/test/fixtures && python -m SimpleHTTPServer 10200 &

NODE=$([ $(node -v | grep -E "v4") ] && echo "node --harmony" || echo "node")
config="$PWD/lighthouse-cli/test/fixtures/smoketest-config.json"
flags="--config-path=$config"
#config="$PWD/lighthouse-cli/test/fixtures/smoketest-config.json"
#flags="--config-path=$config"

offline200result="URL responds with a 200 when offline"

$NODE lighthouse-cli $flags http://localhost:9999/online-only.html > results
# run default lighthouse run against a boring basic page
$NODE lighthouse-cli --quiet http://localhost:10200/online-only.html > results
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to add --quiet? It's reassuring to see the log output in there :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it makes it harder to go through the travis logs and I've not yet debugged a smoketest via its logs.


# test that we have results
if ! grep -q "$offline200result" results; then
Expand All @@ -34,10 +35,10 @@ fi
#
# # test mojibrush which should pass the offline test
# $NODE lighthouse-cli $flags https://www.moji-brush.com > results
#
#
# if ! grep -q "$offline200result: true" results; then
# echo "Fail! offline ready site did not work while offline"
# cat results
# exit 1
# fi
#
#