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
3
3
4
4
CONTAINER_NAME := 'splunk'
5
5
6
- .PHONY : docs test test-unit test-integration up wait_up remove down refresh start restart finish
6
+ .PHONY : docs
7
7
docs :
8
8
@echo " $( GREEN_COLOR) ==> docs $( RESET_COLOR) "
9
9
@rm -rf ./docs/_build
10
10
@make -C ./docs html
11
11
@echo " $( GREEN_COLOR) ==> Docs pages can be found at docs/_build/html"
12
12
@echo " $( GREEN_COLOR) ==> Docs bundle available at docs/_build/docs_html.zip"
13
13
14
+ .PHONY : test
14
15
test :
15
16
@echo " $( GREEN_COLOR) ==> test $( RESET_COLOR) "
16
17
@python -m pytest ./tests
17
18
18
- test :
19
+ .PHONY : test-unit
20
+ test-unit :
19
21
@echo " $( GREEN_COLOR) ==> test $( RESET_COLOR) "
20
22
@python -m pytest ./tests/unit
21
23
22
- test :
24
+ .PHONY : test-integration
25
+ test-integration :
23
26
@echo " $( GREEN_COLOR) ==> test $( RESET_COLOR) "
24
27
@python -m pytest ./tests/integration ./tests/system
25
28
26
- up :
29
+ .PHONY : docker-up
30
+ docker-up :
27
31
@echo " $( GREEN_COLOR) ==> up $( RESET_COLOR) "
28
32
@docker-compose up -d
29
33
30
- remove :
34
+ .PHONY : docker-remove
35
+ docker-remove :
31
36
@echo " $( GREEN_COLOR) ==> rm $( RESET_COLOR) "
32
37
@docker-compose rm -f -s
33
38
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) "
36
42
@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
37
43
38
- down :
44
+ .PHONY : docker-down
45
+ docker-down :
39
46
@echo " $( GREEN_COLOR) ==> down $( RESET_COLOR) "
40
47
@docker-compose stop
41
48
42
- start : up wait_up
49
+ .PHONY : docker-start
50
+ docker-start : docker-up docker-ensure-up
43
51
44
- restart : down start
52
+ .PHONY : docker-restart
53
+ docker-restart : docker-down docker-start
45
54
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.
190
190
To run both unit and integration tests:
191
191
192
192
``` sh
193
- make test
193
+ make test-unit
194
194
```
195
195
196
196
#### Integration tests
@@ -202,10 +202,9 @@ Do not run the test suite against a production instance of Splunk! It will run j
202
202
##### Prerequisites
203
203
204
204
- ` docker ` /` podman `
205
- - ` tox `
206
205
207
206
``` sh
208
- SPLUNK_VERSION=latest && make start
207
+ SPLUNK_VERSION=latest && make docker- start
209
208
```
210
209
211
210
### Optional: Set up logging for splunklib
You can’t perform that action at this time.
0 commit comments