UNPKG

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