BradleyA / user-files

General user files for new systems
MIT License
2 stars 0 forks source link

hooks/(pre,post)-commit Create production standard 10.0 Testing using .git/hooks #26

Closed BradleyA closed 5 years ago

BradleyA commented 5 years ago

hooks/(pre,post)-commit Create TESTing production standard using .git/hooks

The strategy of these scripts is to assist developers and testers with running a command and then checking the output, or exit code.

Design work and working prototype-type was completed using shell script [docker-security-infrastructure/ssh/check-user-ssh.sh] (https://github.com/BradleyA/docker-security-infrastructure/issues/57)

Note I found about hooks I need to remember and add to the readme why I added a hooks directory so the hooks can be managed by the repository Hooks are per-repository and are never pushed. Similarly, the repo config isn't pushed either, nor is anything in .git/info , or a number of other things. Pushing and pulling only exchanges branches/tags and commit objects (and anything reachable from a commit, e.g. trees, blobs)

BradleyA commented 5 years ago

post-commit

+#      post-commit - (git hook) run test cases if found
+#         Loop through commited files found in ${COMMIT_FILE_LIST}                  created by pre-commit (git hook)
+#           Check if COMMIT_FILE has a 'TEST' directory
+#              Create list of FVT test cases
+#                     Links FVT-< >.expected (test case output) to other FVT test cases requiring the same test case output
+#                             Loop through FVT_TEST_CASES
+#                                     Run FVT_TEST_CASE

pre-commit - (git hook) Create ${COMMIT_FILE_LIST}