File tree Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Original file line number Diff line number Diff line change @@ -3,44 +3,54 @@ GREEN_COLOR=\033[32;01m
33
44CONTAINER_NAME := 'splunk'
55
6- .PHONY : docs test test-unit test-integration up wait_up remove down refresh start restart finish
6+ .PHONY : docs
77docs :
88 @echo " $( GREEN_COLOR) ==> docs $( RESET_COLOR) "
99 @rm -rf ./docs/_build
1010 @make -C ./docs html
1111 @echo " $( GREEN_COLOR) ==> Docs pages can be found at docs/_build/html"
1212 @echo " $( GREEN_COLOR) ==> Docs bundle available at docs/_build/docs_html.zip"
1313
14+ .PHONY : test
1415test :
1516 @echo " $( GREEN_COLOR) ==> test $( RESET_COLOR) "
1617 @python -m pytest ./tests
1718
18- test :
19+ .PHONY : test-unit
20+ test-unit :
1921 @echo " $( GREEN_COLOR) ==> test $( RESET_COLOR) "
2022 @python -m pytest ./tests/unit
2123
22- test :
24+ .PHONY : test-integration
25+ test-integration :
2326 @echo " $( GREEN_COLOR) ==> test $( RESET_COLOR) "
2427 @python -m pytest ./tests/integration ./tests/system
2528
26- up :
29+ .PHONY : docker-up
30+ docker-up :
2731 @echo " $( GREEN_COLOR) ==> up $( RESET_COLOR) "
2832 @docker-compose up -d
2933
30- remove :
34+ .PHONY : docker-remove
35+ docker-remove :
3136 @echo " $( GREEN_COLOR) ==> rm $( RESET_COLOR) "
3237 @docker-compose rm -f -s
3338
34- wait_up :
35- @echo " $( GREEN_COLOR) ==> wait_up $( RESET_COLOR) "
39+ .PHONY : docker-ensure-up
40+ docker-ensure-up :
41+ @echo " $( GREEN_COLOR) ==> wait-up $( RESET_COLOR) "
3642 @for i in ` seq 0 180` ; do if docker exec -it $( CONTAINER_NAME) /sbin/checkstate.sh & > /dev/null; then break ; fi ; printf " \rWaiting for Splunk for %s seconds..." $$ i; sleep 1; done
3743
38- down :
44+ .PHONY : docker-down
45+ docker-down :
3946 @echo " $( GREEN_COLOR) ==> down $( RESET_COLOR) "
4047 @docker-compose stop
4148
42- start : up wait_up
49+ .PHONY : docker-start
50+ docker-start : docker-up docker-ensure-up
4351
44- restart : down start
52+ .PHONY : docker-restart
53+ docker-restart : docker-down docker-start
4554
46- refresh : remove start
55+ .PHONY : docker-refresh
56+ docker-refresh : docker-remove docker-start
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ This repo contains a collection of unit and integration tests.
190190To run both unit and integration tests:
191191
192192``` sh
193- make test
193+ make test-unit
194194```
195195
196196#### Integration tests
@@ -202,10 +202,9 @@ Do not run the test suite against a production instance of Splunk! It will run j
202202##### Prerequisites
203203
204204- ` docker ` /` podman `
205- - ` tox `
206205
207206``` sh
208- SPLUNK_VERSION=latest && make start
207+ SPLUNK_VERSION=latest && make docker- start
209208```
210209
211210### Optional: Set up logging for splunklib
You can’t perform that action at this time.
0 commit comments