Skip to content

Commit 8b01aea

Browse files
authored
Merge pull request #44 from oslabs-beta/dev
Dev
2 parents 6add686 + cb9e4ed commit 8b01aea

File tree

8 files changed

+164
-45
lines changed

8 files changed

+164
-45
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Integration-Tests
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "master" branch
8+
push:
9+
branches:
10+
- ms/**
11+
- gb/**
12+
- jl/**
13+
- mx/**
14+
- ja/**
15+
pull_request:
16+
branches:
17+
- dev
18+
19+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
20+
jobs:
21+
# This workflow contains a single job called "build"
22+
build:
23+
# The type of runner that the job will run on
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 3
26+
27+
# Steps represent a sequence of tasks that will be executed as part of the job
28+
steps:
29+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30+
- uses: actions/checkout@v3
31+
32+
- name: Start Containers
33+
run: docker-compose -f "docker-compose.yml" up -d --build
34+
35+
- name: Install node
36+
uses: actions/setup-node@v1
37+
with:
38+
node-version: 16.x
39+
40+
- name: Install dependencies
41+
run: npm install
42+
43+
- name: Sleep for 30 seconds
44+
run: sleep 30s
45+
shell: bash
46+
47+
- name: Run tests
48+
run: npm run test
49+
50+
- name: Stop containers
51+
if: always()
52+
run: docker-compose -f "docker-compose.yml" down

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,10 @@ dist
103103
# TernJS port file
104104
.tern-port
105105

106+
# Local
107+
ksqljsTest.js
108+
package-lock.json
109+
local_ignore/
110+
.gitignore
106111

107112

__tests__/integrationtests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const { default: waitForExpect } = require('wait-for-expect');
21
const ksqldb = require('../ksqldb/ksqldb');
32
// Pre-requisite: start a docker container
43
/* To add to README: Prior to running test with 'npm test', please start the ksqlDB

ksqldb/customErrors.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ class ksqlDBError extends Error {
1010

1111
// Ensure the name of this error is the same as the class name
1212
this.name = this.constructor.name
13-
13+
1414
// capturing the stack trace keeps the reference to your error class
1515
Error.captureStackTrace(this, this.constructor);
16-
16+
1717
// you may also assign additional properties to your error
1818
//this.status = 404
19+
Object.keys(error).forEach(property => {this[property] = error[property]});
1920
}
2021
}
2122

@@ -46,10 +47,22 @@ class InappropriateStringParamError extends QueryBuilderError {
4647
}
4748
}
4849

50+
class invalidArgumentTypes extends Error {
51+
constructor(message) {
52+
super(message);
53+
54+
this.name = this.constructor.name;
55+
// necessary?
56+
Error.captureStackTrace(this, this.constructor);
57+
58+
}
59+
}
60+
4961
module.exports = {
5062
ksqlDBError,
5163
QueryBuilderError,
5264
EmptyQueryError,
5365
NumParamsError,
54-
InappropriateStringParamError
66+
InappropriateStringParamError,
67+
invalidArgumentTypes
5568
};

0 commit comments

Comments
 (0)