1 | COMPANIES="INC LLC F01"
|
2 | DEBUG="info*,debug*,warn*,error*,test*,accountifie-svc*"
|
3 | LOG_LEVEL=0
|
4 | URL_BASE="http://localhost:5124"
|
5 |
|
6 | run:
|
7 | DEBUG=$(DEBUG) \
|
8 | LOG_LEVEL=$(LOG_LEVEL) \
|
9 | ./node_modules/.bin/supervisor bin/accountifie-svc | ./node_modules/.bin/bunyan -l $(LOG_LEVEL)
|
10 |
|
11 | test:
|
12 | $(MAKE) DEBUG= LOG_LEVEL=20 test-cucumber
|
13 |
|
14 | docs:
|
15 | ./node_modules/.bin/apidoc -o './docs' -i './lib'
|
16 |
|
17 | test-json:
|
18 | DEBUG= LOG_LEVEL=100 ./node_modules/.bin/cucumber-js -f json:test-report.json
|
19 |
|
20 | test-lpq:
|
21 | DEBUG= LOG_LEVEL=20 ./node_modules/.bin/cucumber.js --tags @low-priority-queue
|
22 |
|
23 | test-gl:
|
24 | DEBUG= LOG_LEVEL=20 ./node_modules/.bin/cucumber.js --tags @general-ledger
|
25 |
|
26 | test-cucumber:
|
27 | DEBUG=$(DEBUG) ./node_modules/.bin/cucumber-js
|
28 |
|
29 | test-current:
|
30 | DEBUG=$(DEBUG) ./node_modules/.bin/cucumber.js -f pretty features* --tags @current
|
31 |
|
32 | test-watch:
|
33 | hash watch-run 2>/dev/null || npm install watch-run -g
|
34 | watch-run -i -p '+(features|lib)/**' make test
|
35 |
|
36 | take-snapshot:
|
37 | curl -X POST '$(URL_BASE)/gl/$(COMPANY)/take-snapshot' | ./node_modules/.bin/underscore pretty
|
38 |
|
39 | take-snapshot-multi:
|
40 | for COMPANY in $(COMPANIES); do COMPANY=$$COMPANY $(MAKE) take-snapshot; done;
|
41 |
|
42 | create-company:
|
43 | curl -X POST '$(URL_BASE)/gl/$(COMPANY)/create' | ./node_modules/.bin/underscore pretty
|
44 |
|
45 | create-company-multi:
|
46 | for COMPANY in $(COMPANIES); do COMPANY=$$COMPANY $(MAKE) create-company; done;
|
47 |
|
48 | disable-cache:
|
49 | curl -X POST '$(URL_BASE)/gl/$(COMPANY)/disable-balance-cache' | ./node_modules/.bin/underscore pretty
|
50 |
|
51 | disable-cache-multi:
|
52 | for COMPANY in $(COMPANIES); do COMPANY=$$COMPANY $(MAKE) disable-cache; done;
|
53 |
|
54 | enable-cache:
|
55 | curl -X POST '$(URL_BASE)/gl/$(COMPANY)/enable-balance-cache' | ./node_modules/.bin/underscore pretty
|
56 |
|
57 | enable-cache-multi:
|
58 | for COMPANY in $(COMPANIES); do COMPANY=$$COMPANY $(MAKE) enable-cache; done;
|
59 |
|
60 | add-filter:
|
61 | curl -X POST --data "excludingCounterparties=$(EXCLUDING_COUNTERPARTIES)" '$(URL_BASE)/gl/$(COMPANY)/add-filter' | ./node_modules/.bin/underscore pretty
|
62 |
|
63 | add-filter-multi:
|
64 | for COMPANY in $(COMPANIES); do COMPANY=$$COMPANY $(MAKE) add-filter; done;
|
65 |
|
66 | transaction-info:
|
67 | curl '$(URL_BASE)/gl/$(COMPANY)/transaction/$(TRANSACTION)' | ./node_modules/.bin/underscore pretty
|
68 |
|
69 | account-transactions:
|
70 | curl '$(URL_BASE)/gl/$(COMPANY)/account/$(ACCOUNT)/transactions' | ./node_modules/.bin/underscore pretty
|
71 |
|
72 | snapshot-transactions:
|
73 | curl '$(URL_BASE)/gl/$(COMPANY)/snapshot-transactions?snapshotDate=$(DATE)' | ./node_modules/.bin/underscore pretty
|
74 |
|
75 | delete-transaction:
|
76 | curl -X POST '$(URL_BASE)/gl/$(COMPANY)/transaction/$(TRANSACTION)/delete' | ./node_modules/.bin/underscore pretty
|
77 |
|
78 | .PHONY: test test-cucumber docs
|