Skip to content

Commit

Permalink
Closes #24, #26, #27 & #28
Browse files Browse the repository at this point in the history
Thanks to @AlexanderArce for his initial work on the tests :)

Squashed commit of the following:

commit aee75d2
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 16:23:10 2018 +0100

    Improved error message for HTTP plugin

commit 83895c4
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 16:22:52 2018 +0100

    Use yarn instead of npm for docker build (as we have a yarn.lock, not an npm-lockfile.json)

commit c5dd3be
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 14:15:40 2018 +0100

    Updated asciinema

commit ff6a63e
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 14:10:46 2018 +0100

    Also check demo operators with test-operators (only at gitlab.com)

commit cc88ae9
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 14:08:05 2018 +0100

    Minor package.json changes

commit fa43fda
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 14:07:27 2018 +0100

    Move operator files to `test/files` folder, so we can properly mount
    volumes with the generated docker image

commit 0e7736d
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 13:55:42 2018 +0100

    Removed unnecessary (commented) log

commit 6ef445f
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 13:53:24 2018 +0100

    Added optional descriptions to tests, and properly display them

commit bba516e
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 13:34:33 2018 +0100

    Finnally we can run multiple tests on the same operator !

commit 6044e0c
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 12:39:42 2018 +0100

    Standarized plugin debug & log messages (at least the ones from execute method)

commit d983eb6
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Fri Nov 23 12:24:20 2018 +0100

    Now all plugins receive the message on execute, not on construct

commit 05ad689
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 22 17:57:24 2018 +0100

    We need the message in the constructor of the plugins (still moving
    things..)

commit 0ca6751
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 22 14:31:01 2018 +0100

    Minor readme change

commit a811fa2
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 22 11:15:03 2018 +0100

    Added injectResponse method to HTTP mock + other required changes

commit 6b38b24
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Mon Nov 19 17:21:39 2018 +0100

    Just the operators-tester full of logs

commit 6c77ed3
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Mon Nov 19 17:20:40 2018 +0100

    Upgraded all plugins left (dirty commit, still needs work)

commit 5d8849a
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Mon Nov 19 14:29:40 2018 +0100

    Updated conditional and log plugins

commit 2c08500
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Mon Nov 19 14:04:09 2018 +0100

    Fixed ExecutionPluginInterface options type

commit cd5a5e0
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Mon Nov 19 13:38:48 2018 +0100

    Added ExecutionPluginInterface + already updated HTTP plugin

commit 09c7445
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Mon Nov 19 13:00:13 2018 +0100

    Moving schemas to schemas folder

commit 6af24da
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 19:35:44 2018 +0100

    Adding testing yaml and json files (shall be removed once finished with

commit eeedc84
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 19:34:51 2018 +0100

    WIP: working on #27

commit f246989
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 19:08:52 2018 +0100

    Uncommented necessary log

commit fcdabef
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 19:07:02 2018 +0100

    yarn.lock file shouldn't have been removed

commit db194e7
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 19:05:45 2018 +0100

    Changed operators-tester message

commit 751fada
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 19:04:32 2018 +0100

    Added gitlab-ci badge

commit db0528b
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 19:04:18 2018 +0100

    Added missing test folder for jest

commit 59acba3
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 18:42:18 2018 +0100

    Removed dummy files

commit 37ca2fb
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 18:41:42 2018 +0100

    Removed erroneus trailing coma

commit ca9ef09
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 18:38:22 2018 +0100

    Removed unnecessary comment

commit 7f7c4c6
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 18:27:21 2018 +0100

    Fixed ActionCreator not throwing error when empty actions were passed

commit a7d68dc
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:58:01 2018 +0100

    Also add node 9 to travis tests

commit 89d661f
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:57:08 2018 +0100

    Think I found that unhandled promise..

commit 18b2f21
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:52:44 2018 +0100

    Trying to fix that unhandled promise rejection

commit 16eaf25
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:52:33 2018 +0100

    Fixed tests cannot be empty..

commit e8005b4
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:50:13 2018 +0100

    Ok... found it out.

commit cd2e52e
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:46:15 2018 +0100

    Well this starts to be awkward

commit 424bc94
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:40:53 2018 +0100

    Funny thing is that all of them work locally.. but fail on the CI
    servers..

commit a0a07e2
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:37:14 2018 +0100

    Fixed some async tests

commit 95bd587
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:33:47 2018 +0100

    Add --foceExit until supertest issue is resolved

    See ladjs/supertest#437

commit f19983d
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:32:15 2018 +0100

    Migrated remaining tests to jest + removed mocha, chai and other old
    dependencies

    refs #26

commit 2480b65
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:05:16 2018 +0100

    Trying to find out where open handles come from in cloud runners

commit f84f953
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 17:01:26 2018 +0100

    I said we dropped support for node 6...

commit c1179b8
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 16:59:39 2018 +0100

    Added .gitlab-ci.yml file

commit 68be252
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 16:51:53 2018 +0100

    Properly expose express server to close its connection

commit 24c6c7f
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 16:48:08 2018 +0100

    Drop support for node 6 and add support for node 10

commit 422be67
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 16:47:51 2018 +0100

    Update dockerfile maintainer label

commit 3989820
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 16:47:38 2018 +0100

    Ensure express closes its connection after ending tests

commit a7cf365
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 14:53:54 2018 +0100

    Fixed json syntax in readme file

commit 8b575df
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 14:29:18 2018 +0100

    Added asciinema of running test-operators

commit a49640d
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 14:14:28 2018 +0100

    Remove cfs from tasks' names

commit e7ce462
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Thu Nov 15 14:13:49 2018 +0100

    Updated readme adding info about how to test operators

commit 9c52c54
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 12:34:01 2018 +0100

    Created new script for testing the operators called test-operators located in test/

commit eb55701
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 12:33:28 2018 +0100

    Moved operators-tester from src/ to test/

commit 57f2ae1
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:59:59 2018 +0100

    Now the operators-tester is empty

commit 9fb72f4
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:59:16 2018 +0100

    Fixed import

commit 88ca318
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:58:34 2018 +0100

    Renamed sbo-tester to operators-tester

commit 5ee189b
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:57:58 2018 +0100

    Added to the logger the colorize and enabled silent only for test ENV

commit 0572a32
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:57:22 2018 +0100

    Added event name

commit 418ebf0
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:56:07 2018 +0100

    Removed unused imports

commit 7db69d1
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:55:39 2018 +0100

    Moved PluginOptionsSchema to new file for testing

commit 8a0abc1
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:54:50 2018 +0100

    Added preLog to telegram and prev2task mocks

commit 8e00024
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:54:07 2018 +0100

    Created httpplugin mock

commit 8869d51
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 11:52:01 2018 +0100

    Due to changes in how files are readed we need to change imports

commit 0ddeebc
Author: Alexander Arce <alexander@cirici.com>
Date:   Thu Nov 15 12:05:25 2018 +0100

    Fixed conflict

commit 851412c
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Wed Nov 14 17:21:55 2018 +0100

    Ensure TypeScript does not check included packages types (jest types
    have issues and make the build fail)

commit ebe1d1a
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Wed Nov 14 17:21:22 2018 +0100

    Updating readme

commit ba6a58d
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Wed Nov 14 12:13:48 2018 +0100

    Fixed OperatorsLoader.spec

commit 4491ba9
Author: Alexander Arce <alexander@cirici.com>
Date:   Wed Nov 14 09:26:00 2018 +0100

    Removed operator

commit 891096e
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 17:08:53 2018 +0100

    Removed the slient from winston

commit 17af3be
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 17:08:26 2018 +0100

    Removed comments, added an expect

commit d5b9e89
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 17:07:37 2018 +0100

    Now the mocks are ES6 classes for using the constructor

commit 2030f60
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 17:07:06 2018 +0100

    Added a string to copyEmail for testing

commit 6dd724b
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Tue Nov 13 16:28:49 2018 +0100

    Adding fs __mock__ (dirty commit..)

commit c50ad79
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 14:34:37 2018 +0100

    Adapted tests for jest

commit 7c59e97
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 14:34:23 2018 +0100

    Added silent in winston for testing

commit f1850bb
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 14:33:56 2018 +0100

    Added supertest and superagent

commit d5b45ab
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 14:33:39 2018 +0100

    Now we are using jest for testing

commit 867d30c
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Tue Nov 13 13:48:06 2018 +0100

    All execution-plugins are now tested with jest

commit 236a873
Author: Òscar Casajuana <elboletaire@gmail.com>
Date:   Tue Nov 13 13:22:18 2018 +0100

    Replacing sinon, mocha and chai with jest

    refs #26

commit 32cdb14
Author: Alexander Arce <alexander@cirici.com>
Date:   Tue Nov 13 13:05:08 2018 +0100

    Dirty commit
  • Loading branch information
elboletaire committed Nov 23, 2018
1 parent 8c57f1f commit 8526f86
Show file tree
Hide file tree
Showing 53 changed files with 4,562 additions and 1,715 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
node_modules
built
yarn-error.log
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
@@ -0,0 +1,31 @@
stages:
- test

.test: &test
image: node:${NODE_VERSION}
stage: test
before_script:
- yarn
script:
- yarn test
- yarn test-operators

node-7:
<<: *test
variables:
NODE_VERSION: '7'

node-8:
<<: *test
variables:
NODE_VERSION: '8'

node-9:
<<: *test
variables:
NODE_VERSION: '9'

node-10:
<<: *test
variables:
NODE_VERSION: '10'
3 changes: 2 additions & 1 deletion .travis.yml
@@ -1,5 +1,6 @@
language: node_js
node_js:
- 10
- 9
- 8
- 7
- 6
4 changes: 2 additions & 2 deletions Dockerfile
@@ -1,12 +1,12 @@
FROM node

MAINTAINER Genar Trias <genar@alvarium.io>
LABEL maintainer="Alvarium.io <hello@alvarium.io>"

COPY . /app

WORKDIR /app

RUN npm install && npm run build
RUN yarn && yarn build

ENV NODE_ENV production

Expand Down

0 comments on commit 8526f86

Please sign in to comment.