Skip to content

Commit b594d36

Browse files
authored
Merge pull request #126 from splunk/DVPL-9625
Nodeunit to Mocha Transition for Server Side Tests
2 parents 39ec46c + 79e31c5 commit b594d36

File tree

74 files changed

+16471
-14325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+16471
-14325
lines changed

.github/workflows/mocha-test.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Mocha tests CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os:
12+
- ubuntu-latest
13+
node:
14+
- 14
15+
splunk-version:
16+
- "8.0"
17+
- "latest"
18+
19+
services:
20+
splunk:
21+
image: splunk/splunk:${{matrix.splunk-version}}
22+
env:
23+
SPLUNK_START_ARGS: --accept-license
24+
SPLUNK_HEC_TOKEN: 11111111-1111-1111-1111-1111111111113
25+
SPLUNK_PASSWORD: changed!
26+
SPLUNK_APPS_URL: https://github.com/splunk/sdk-app-collection/releases/download/v1.0.0/sdk-app-collection.tgz
27+
ports:
28+
- 8000:8000
29+
- 8088:8088
30+
- 8089:8089
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
35+
- name: Use node ${{ matrix.node }}
36+
uses: actions/setup-node@v2
37+
with:
38+
node-version: ${{ matrix.node }}
39+
40+
- name: Create .splunkrc file
41+
run: |
42+
cd ~
43+
echo host=localhost > .splunkrc
44+
echo port=8089 >> .splunkrc
45+
echo username=admin >> .splunkrc
46+
echo password=changed! >> .splunkrc
47+
echo scheme=https >> .splunkrc
48+
echo version=${{ matrix.splunk }} >> .splunkrc
49+
50+
- name: Run npm install
51+
run: npm install
52+
53+
- name: Run server tests
54+
run: make test
55+
env:
56+
SPLUNK_HOME: /opt/splunk

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ init:
2424
.PHONY: test
2525
test:
2626
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"
27-
@node sdkdo tests
27+
@node sdkdo tests ${arg}
2828

2929
.PHONY: test_specific
3030
test_specific:

0 commit comments

Comments
 (0)