From 7512681d64b8cfbedc52681ebe48279ea801ebe2 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sat, 20 Apr 2019 19:42:38 +0200 Subject: [PATCH] init test files --- doc/7_develop.md | 6 +-- test/ALL-tests.sh | 6 +-- test/a-commit-test.sh | 2 +- test/a-push-test.sh | 2 +- test/c-init-test.sh | 2 +- test/c-init-test/botacl | 0 test/c-init-test/botadmin | 1 + test/c-init-test/count.test | 80 +++++++++++++++++++++++++++++++++++++ 8 files changed, 90 insertions(+), 9 deletions(-) create mode 100644 test/c-init-test/botacl create mode 100644 test/c-init-test/botadmin create mode 100644 test/c-init-test/count.test diff --git a/doc/7_develop.md b/doc/7_develop.md index 4e4f79f..41cff09 100644 --- a/doc/7_develop.md +++ b/doc/7_develop.md @@ -38,8 +38,8 @@ Starting with version 0.70 bashbot has a test suite. To start testsuite run ```t To create a new test create a new bash script named ```p-name-test.sh```, where p is pass 'a-z' and name the name of your test. All tests with the same pass are performed together. -Tests with no dependency to other tests will run in pass 'a', tests which need an initialized bahsbot environment must run in pass 'c' or later. -If '$1' is present the script is started from 'ALL-tests.sh' and the script runs in a temporary test environment in directory '$1'. +Tests with no dependency to other tests will run in pass 'a', tests which need an initialized bahsbot environment must run in pass 'd' or later. +If '$1' is present the script is started from 'ALL-tests.sh' and a temporary test environment is setup in directory '$1'. The temporary test environment is created when 'ALL-tests.sh' starts and deleted after all tests are finished. Example test @@ -63,5 +63,5 @@ fi #### [Prev Function Reference](6_function.md) -#### $$VERSION$$ 0.70-dev-16-g2eac362 +#### $$VERSION$$ 0.70-dev-17-gb1aef7d diff --git a/test/ALL-tests.sh b/test/ALL-tests.sh index 6122c72..7919984 100755 --- a/test/ALL-tests.sh +++ b/test/ALL-tests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # this has to run once atfer git clone # and every time we create new hooks -#### $$VERSION$$ 0.70-dev-16-g2eac362 +#### $$VERSION$$ 0.70-dev-17-gb1aef7d # magic to ensure that we're always inside the root of our application, # no matter from which directory we'll run script @@ -12,7 +12,7 @@ cd "${GIT_DIR}/.." || exit 1 TESTENV="/tmp/bashbot.test$$" cp -r . "${TESTENV}" -cd "${TESTENV}" || exit 1 +#cd "${TESTENV}" || exit 1 #set -e fail=0 @@ -46,6 +46,6 @@ else exitcode=1 fi -rm -rf "${TESTENV}" +#rm -rf "${TESTENV}" echo "${passed} / ${tests}" exit ${exitcode} diff --git a/test/a-commit-test.sh b/test/a-commit-test.sh index 00b9713..67d6254 100755 --- a/test/a-commit-test.sh +++ b/test/a-commit-test.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-16-g2eac362 +#### $$VERSION$$ 0.70-dev-17-gb1aef7d dev/hooks/pre-commit.sh diff --git a/test/a-push-test.sh b/test/a-push-test.sh index 9ef525d..40fe041 100755 --- a/test/a-push-test.sh +++ b/test/a-push-test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-16-g2eac362 +#### $$VERSION$$ 0.70-dev-17-gb1aef7d dev/hooks/pre-push.sh diff --git a/test/c-init-test.sh b/test/c-init-test.sh index b539622..4467ce8 100755 --- a/test/c-init-test.sh +++ b/test/c-init-test.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-16-g2eac362 +#### $$VERSION$$ 0.70-dev-17-gb1aef7d TOKENFILE="./token" TESTTOKEN="bashbottestscript" diff --git a/test/c-init-test/botacl b/test/c-init-test/botacl new file mode 100644 index 0000000..e69de29 diff --git a/test/c-init-test/botadmin b/test/c-init-test/botadmin new file mode 100644 index 0000000..a1e2647 --- /dev/null +++ b/test/c-init-test/botadmin @@ -0,0 +1 @@ +? diff --git a/test/c-init-test/count.test b/test/c-init-test/count.test new file mode 100644 index 0000000..bc1c186 --- /dev/null +++ b/test/c-init-test/count.test @@ -0,0 +1,80 @@ +COUNT-3474588 +COUNT2224533 +COUNT-10011894466 +COUNT7053247 +COUNT6391479 +COUNT6341244 +COUNT4919830 +COUNT2640175 +COUNT7349731 +COUNT7244826 +COUNT2741728 +COUNT6376258 +COUNT-10012414459 +COUNT5869285 +COUNT-10011297801 +COUNT190323 +COUNT7784183 +COUNT-2766119 +COUNT-3859393 +COUNT-10013599717 +COUNT-10012886611 +COUNT2442778 +COUNT5759451 +COUNT5254245 +COUNT3781067 +COUNT7916264 +COUNT7235018 +COUNT3349831 +COUNT2933766 +COUNT5924516 +COUNT6374645 +COUNT6407149 +COUNT2383316 +COUNT5447722 +COUNT231261 +COUNT7853337 +COUNT7768269 +COUNT7546987 +COUNT7882954 +COUNT6081264 +COUNT4473899 +COUNT6000622 +COUNT7489339 +COUNT7925467 +COUNT146383 +COUNT1850458 +COUNT5232050 +COUNT7827320 +COUNT3230155 +COUNT5110579 +COUNT2968981 +COUNT6709735 +COUNT3042403 +COUNT6973351 +COUNT3739552 +COUNT6073516 +COUNT7773218 +COUNT7570810 +COUNT7165830 +COUNT7836756 +COUNT2603688 +COUNT2792256 +COUNT1199924 +COUNT7044680 +COUNT5011616 +COUNT5944645 +COUNT6040303 +COUNT7787713 +COUNT7670967 +COUNT4902763 +COUNT8168450 +COUNT5233276 +COUNT-10012311537 +COUNT7648681 +COUNT4170584 +COUNT3045040 +COUNT5919227 +COUNT3364980 +COUNT-3450384 +COUNT7287381