forked from hiero-ledger/solo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.tests.yml
More file actions
192 lines (169 loc) · 8.28 KB
/
Taskfile.tests.yml
File metadata and controls
192 lines (169 loc) · 8.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
version: 3
vars:
cross_env: npx cross-env
mocha_bin: npx mocha
c8_bin: npx c8
test_prefix: "{{ .cross_env }} MOCHA_SUITE_NAME"
reporter_prefix: "{{ .c8_bin }} --report-dir"
reporter_options_prefix: --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit
tasks:
test-setup:
desc: "Setup for E2E tests that require a single cluster environment"
cmds:
- SOLO_CLUSTER_DUALITY=1 sh {{.TASKFILE_DIR | toSlash}}/test/e2e/dual-cluster/setup-dual-e2e.sh
dual-cluster-setup:
desc: "Setup for E2E tests that require a dual cluster environment"
cmds:
- sh {{.TASKFILE_DIR | toSlash}}/test/e2e/dual-cluster/setup-dual-e2e.sh
test:
desc: "Runs all unit tests with coverage and generates reports in coverage/unit"
cmds:
- "{{ .test_prefix }}=\"Unit Tests\"
{{ .reporter_prefix }}='coverage/unit'
{{ .mocha_bin }} 'test/unit/**/*.ts'
--exclude 'test/unit/core/helm/**/*.ts'
{{ .reporter_options_prefix }}.xml"
test-mathex:
desc: "Runs all MathEx unit tests with coverage and generates reports in coverage/unit-mathex"
cmds:
- "{{ .test_prefix }}=\"MathEx Unit Tests\"
{{ .reporter_prefix }}='coverage/unit-mathex'
{{ .mocha_bin }} 'test/unit/**/math-ex*.ts'
{{ .reporter_options_prefix }}.xml"
test-data:
desc: "Runs all Data Layer unit tests with coverage and generates reports in coverage/unit-data"
cmds:
- "{{ .test_prefix }}=\"Data Layer Unit Tests\"
{{ .reporter_prefix }}='coverage/unit-data'
{{ .mocha_bin }} 'test/unit/data/**'
{{ .reporter_options_prefix }}.xml"
test-e2e-all:
desc: "Runs all E2E tests with coverage and generates reports in coverage/e2e-all"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E All Tests\"
{{ .reporter_prefix }}='coverage/e2e-all'
{{ .mocha_bin }} 'test/e2e/**/*.ts'
{{ .reporter_options_prefix }}-e2e-all.xml"
test-e2e-integration:
desc: "Runs E2E integration tests with coverage and generates reports in coverage/e2e-integration"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Integration Tests\"
{{ .reporter_prefix }}='coverage/e2e-integration'
{{ .mocha_bin }} 'test/e2e/integration/**/*.ts'
{{ .reporter_options_prefix }}-e2e-integration.xml"
test-e2e-leases:
desc: "Runs E2E lease tests with coverage and generates reports in coverage/e2e-leases"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Lease Tests\"
{{ .reporter_prefix }}='coverage/e2e-leases'
{{ .mocha_bin }} 'test/e2e/integration/core/lease*.test.ts'
{{ .reporter_options_prefix }}-e2e-integration.xml"
test-helm:
desc: "Runs Helm unit tests with coverage and generates reports in coverage/unit-helm"
cmds:
- "{{ .test_prefix }}=\"Unit Helm Tests\"
{{ .reporter_prefix }}='coverage/unit-helm'
{{ .mocha_bin }} 'test/unit/core/helm/**/*.ts'
{{ .reporter_options_prefix }}.xml"
test-e2e-standard:
desc: "Runs standard E2E tests with coverage and generates reports in coverage/e2e-standard"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Standard Tests\"
{{ .reporter_prefix }}='coverage/e2e-standard'
{{ .mocha_bin }} 'test/e2e/**/*.ts'
--ignore 'test/e2e/integration/**/*.ts'
--ignore 'test/e2e/commands/node*.ts'
--ignore 'test/e2e/commands/separate-node*.ts'
--ignore 'test/e2e/commands/block-node.test.ts'
--ignore 'test/e2e/commands/dual-*.ts'
--ignore 'test/e2e/commands/external-*.ts'
--ignore 'test/e2e/commands/one-shot-single.test.ts'
--ignore 'test/e2e/commands/separate-node-update.test.ts'
--ignore 'test/e2e/commands/separate-node-add.test.ts'
--ignore 'test/e2e/commands/separate-node-destroy.test.ts'
--ignore 'test/e2e/commands/separate-node-upgrade.test.ts'
--ignore 'test/e2e/commands/performance.test.ts'
{{ .reporter_options_prefix }}-e2e-standard.xml --timeout 30000"
test-e2e-node-add-local:
desc: "Runs E2E Node Add Local tests with coverage and generates reports in coverage/e2e-node-add-local"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Node Add Local Tests\"
{{ .reporter_prefix }}='coverage/e2e-node-add-local'
{{ .mocha_bin }} 'test/e2e/commands/node-add-local.test.ts'
{{ .reporter_options_prefix }}-e2e-node-add-local.xml"
test-e2e-node-upgrade:
desc: "Runs E2E Node Upgrade tests with coverage and generates reports in coverage/e2e-node-upgrade"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Node Upgrade Tests\"
{{ .reporter_prefix }}='coverage/e2e-node-upgrade'
{{ .mocha_bin }} 'test/e2e/commands/node-upgrade.test.ts'
{{ .reporter_options_prefix }}-e2e-node-upgrade.xml"
test-e2e-block-node:
desc: "Runs E2E Block Node tests with coverage and generates reports in coverage/e2e-block-node"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Block Nodes Tests\"
{{ .reporter_prefix }}='coverage/e2e-block-node'
{{ .mocha_bin }} 'test/e2e/commands/block-node.test.ts'
{{ .reporter_options_prefix }}-e2e-block-node.xml"
test-e2e-dual-cluster-full:
desc: "Runs E2E Dual Cluster Full tests with coverage and generates reports in coverage/e2e-dual-cluster-full"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Dual Cluster Full Test\"
{{ .reporter_prefix }}='coverage/e2e-dual-cluster-full'
{{ .mocha_bin }} 'test/e2e/commands/dual-cluster-full.test.ts'
{{ .reporter_options_prefix }}-e2e-dual-cluster-full.xml"
test-e2e-external-database:
desc: "Runs E2E External Database tests with coverage and generates reports in coverage/e2e-external-database"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E External Database Test\"
{{ .reporter_prefix }}='coverage/e2e-external-database'
{{ .mocha_bin }} 'test/e2e/commands/external-database.test.ts'
{{ .reporter_options_prefix }}-e2e-external-database.xml"
test-external-database:
desc: "Runs the external database example test without coverage (used for local development)"
cmd: |
if [ -z "$CONSENSUS_NODE_VERSION" ]; then
export CONSENSUS_NODE_VERSION=$(awk -F"'" '/HEDERA_PLATFORM_VERSION/ {print $(NF-1); exit}' version.ts)
fi
cd examples/external-database-test
task default
task destroy
test-e2e-one-shot-single:
desc: "Runs E2E One Shot Single tests with coverage and generates reports in coverage/e2e-one-shot-single"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E One Shot Single Test\"
{{ .reporter_prefix }}='coverage/e2e-one-shot-single'
{{ .mocha_bin }} 'test/e2e/commands/one-shot-single.test.ts'
{{ .reporter_options_prefix }}-e2e-one-shot-single.xml"
test-e2e-one-shot-single-minimal:
desc: "Runs E2E One Shot Single Minimal tests with coverage and generates reports in coverage/e2e-one-shot-single-minimal"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E One Shot Single Test - Minimal Setup\"
{{ .reporter_prefix }}='coverage/e2e-one-shot-single-minimal'
{{ .mocha_bin }} 'test/e2e/commands/one-shot-single.test.ts'
{{ .reporter_options_prefix }}-e2e-one-shot-single-minimal.xml"
test-e2e-performance:
desc: "Runs E2E Performance tests with coverage and generates reports in coverage/e2e-performance"
cmds:
- "{{ .test_prefix }}=\"Mocha E2E Performance Test\"
{{ .reporter_prefix }}='coverage/e2e-performance'
{{ .mocha_bin }} 'test/e2e/commands/performance.test.ts'
{{ .reporter_options_prefix }}-e2e-performance.xml"
test-example-node-create-transaction:
desc: "Runs the node create transaction example test without coverage (used for local development)"
dir: examples/node-create-transaction
cmds:
- task
- task destroy
test-example-node-update-transaction:
desc: "Runs the node update transaction example test without coverage (used for local development)"
dir: examples/node-update-transaction
cmds:
- task
- task destroy
test-example-node-delete-transaction:
desc: "Runs the node delete transaction example test without coverage (used for local development)"
dir: examples/node-delete-transaction
cmds:
- task
- task destroy