Skip to content

Commit bbb7fa2

Browse files
authored
feat: integration test suite (readmeio#51)
* feat: initial pass at rewriting the integration testing framework * test: docker tweaks * style: fixing linting problems * ci: using optional chaining in tests so don't run them on node 12 * feat: first pass at containerizing node integrations * feat: making our useObjectBody option the default behavior in node-fetch * fix: removing multipart/form-data headers from node-fetch when we use FormData * fix: bug where node request wasn't sending cookies properly * fix: adding useQuerystring to the node request opts to fix query param arrays * fix: send the full url instead of `qs` for node request because of double encoding issues * fix: issues with node axios not sending encoded and query params right * fix: fixes to the integration tests suite * fix: promoting the js+fetch useObjectBody option to be the default behavior * fix: adding the composer autoloader to the top of guzzle snippets * fix: catch and assert errors when we might be hitting a PROPFIND method * docs: updating our differences list in the readme * chore: renaming the `http` fixture to `http-insecure` * test: setting up the integration tests to run on node, php, and python * feat: getting the docker container running node tests * ci: workflow for running node integrations * ci: moving integration dockerfiles into their own dir * ci: containerizing php integrations * ci: no composer files exist to copy * ci: installing npm deps in the php container so we can run tests * fix: changing python requests target to use full urls instead of supplying query params * ci: containerizing python integration tests * ci: containerizing the curl test suite * ci: adding a github workflow for the shell integration suite
1 parent d40cecd commit bbb7fa2

147 files changed

Lines changed: 618 additions & 418 deletions

File tree

Some content is hidden

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

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"extends": "@readme/eslint-config",
33
"root": true,
4+
"parserOptions": {
5+
"ecmaVersion": 2020
6+
},
47
"rules": {
58
"global-require": "off",
69
"no-underscore-dangle": "off",

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [12.x, 14.x]
12+
node-version: [14.x]
1313

1414
steps:
1515
- uses: actions/[email protected]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Integrations (Node)
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/[email protected]
8+
9+
- name: Run tests
10+
run: docker-compose run integration_node
11+
12+
- name: Cleanup
13+
if: always()
14+
run: docker-compose down
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Integrations (PHP)
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/[email protected]
8+
9+
- name: Run tests
10+
run: docker-compose run integration_php
11+
12+
- name: Cleanup
13+
if: always()
14+
run: docker-compose down
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Integrations (Python)
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/[email protected]
8+
9+
- name: Run tests
10+
run: docker-compose run integration_python
11+
12+
- name: Cleanup
13+
if: always()
14+
run: docker-compose down
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Integrations (Shell)
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/[email protected]
8+
9+
- name: Run tests
10+
run: docker-compose run integration_shell
11+
12+
- name: Cleanup
13+
if: always()
14+
run: docker-compose down

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
*.log
22
node_modules/
33
coverage/
4+
vendor/
5+
composer.*

Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 2 deletions

__tests__/__fixtures__/available-targets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"title": "Shell",
55
"extname": ".sh",
66
"default": "curl",
7+
"cli": "%s",
78
"clients": [
89
{
910
"key": "curl",
@@ -30,6 +31,7 @@
3031
"title": "Node.js",
3132
"extname": ".js",
3233
"default": "native",
34+
"cli": "node %s",
3335
"clients": [
3436
{
3537
"key": "native",
@@ -114,6 +116,7 @@
114116
"title": "PHP",
115117
"extname": ".php",
116118
"default": "curl",
119+
"cli": "php %s",
117120
"clients": [
118121
{
119122
"key": "curl",
@@ -146,6 +149,7 @@
146149
"title": "Python",
147150
"extname": ".py",
148151
"default": "python3",
152+
"cli": "python3 %s",
149153
"clients": [
150154
{
151155
"key": "python3",

0 commit comments

Comments
 (0)