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

Add E2E tests for pihole-FTL commands #1065

Closed
wants to merge 1 commit into from

Conversation

Beanow
Copy link

@Beanow Beanow commented Feb 17, 2021

This demonstrates issues where daemons are running unexpectedly.
Can be used to validate #1064 is fixed.

sleep 2

# Now the daemon has stopped, run e2e tests.
test/libs/bats/bin/bats "test/e2e_test_suite.bats"
Copy link
Author

Choose a reason for hiding this comment

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

Looks like we need to explicitly track the return code, as the build passes while these tests fail.

1..5
ok 1 Running without arguments doesn't block and starts a daemon
ok 2 Running with 'no-daemon' blocks untill killed
not ok 3 Running with 'test' doesn't block and exits immediately
# (in test file test/e2e_test_suite.bats, line 47)
#   `[[ ${lines[1]} == "PID: -" ]]' failed
# Jobs:
# PID: 2508
# Jobs:
# PID: -
not ok 4 Running with '-f test' blocks but exits immediately
# (in test file test/e2e_test_suite.bats, line 57)
#   `[[ ${lines[1]} == "PID: -" ]]' failed
# Jobs:
# [1]+  Running                 timeout -k 5s -s TERM 3s /home/pihole/pihole-FTL -f test &> /dev/null &
# PID: 2533
# Jobs:
# PID: -
ok 5 Running with 'dnsmasq-test' doesn't block and exits immediately

CircleCI received exit code 0

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, look at what we do above for the other bats test. (RET variable later used in exit $RET).

This demonstrates issues where daemons are running unexpectedly.

Signed-off-by: Beanow <497556+Beanow@users.noreply.github.com>
@DL6ER
Copy link
Member

DL6ER commented Dec 27, 2021

Some further tests have been done on branch test/e2e, however, I don't have the time currently to continue working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants