Skip to content

Commit

Permalink
feat: experimentatl
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-t-97 committed Jun 28, 2024
1 parent 31b12be commit 6a8fd2e
Show file tree
Hide file tree
Showing 34 changed files with 38,291 additions and 19,537 deletions.
3 changes: 2 additions & 1 deletion .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ NODE_ENV=production
ENVIRONMENT_NAME=docker
REDIS_HOST=redis
REDIS_PORT=6379
APP_PATH=/home/runner/work/node-express-graphql-template/node-express-graphql-template
APP_PATH=/Users/apple/repos/template/node-express-graphql-template
ENABLE_DEDUP=true
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ RUN mkdir -p ${APP_PATH}/dist
RUN apk add yarn
RUN yarn global add [email protected] [email protected]
RUN yarn add shelljs bull dotenv pg [email protected]
RUN apk add --no-cache dumb-init
ADD scripts/migrate-and-run.sh ${APP_PATH}/
ADD package.json ${APP_PATH}/
ADD . ./
COPY --from=0 ${APP_PATH}/dist ${APP_PATH}/dist
ADD https://keploy-enterprise.s3.us-west-2.amazonaws.com/releases/latest/assets/freeze_time_$PLATFORM.so /lib/keploy/freeze_time_$PLATFORM.so
RUN chmod +x /lib/keploy/freeze_time_$PLATFORM.so
ENV LD_PRELOAD=/lib/keploy/freeze_time_$PLATFORM.so

ENTRYPOINT ["dumb-init", "--"]
STOPSIGNAL SIGINT

CMD ["sh", "./migrate-and-run.sh"]
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
args:
ENVIRONMENT_NAME: .docker
BUILD_NAME: docker
PLATFORM: amd64
PLATFORM: arm64
APP_PATH: ${APP_PATH}
restart: always
depends_on:
Expand All @@ -27,7 +27,7 @@ services:
ports:
- 9000:9000
environment:
ENABLE_DEDUP: "false"
ENABLE_DEDUP: "true"
env_file:
- ./.env.docker
volumes:
Expand Down
25 changes: 15 additions & 10 deletions keploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
path: ""
appId: ""
appId: 0
appName: ""
command: ""
port: 0
proxyPort: 16789
Expand All @@ -15,24 +16,28 @@ buildDelay: 30
test:
selectedTests: {}
globalNoise:
global:
body:
data.signIn.token: []
data.signUp.token: []
header:
Etag: []
Vary: []
test-sets: {}
global:
body:
data.signIn.token: []
data.signUp.token: []
header:
Etag: []
Vary: []
test-sets: {}
delay: 5
apiTimeout: 5
coverage: true
coverage: false
goCoverage: false
coverageReportPath: ""
ignoreOrdering: true
mongoPassword: "default@123"
language: ""
removeUnusedMocks: false
basePath: ""
mocking: true
dedup: true
disableMockUpload: false
freezeTime: false
record:
recordTimer: 0s
filters: []
Expand Down
1 change: 1 addition & 0 deletions keploy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*/mocks.yaml
2 changes: 1 addition & 1 deletion keploy/test-set-0/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ testset:
post_script: ""
template: {}
mocks:
- b76009ec88feefa4e76a742d4f4f5a132d6ae9326c0aa3779ee610d46a15d155.yaml
- daa16f86fded81299cb178aec234e127a08ad8a9174ce8b4e8f8ee23d7eebf0d.yaml
54,301 changes: 34,999 additions & 19,302 deletions keploy/test-set-0/mocks.yaml

Large diffs are not rendered by default.

46 changes: 34 additions & 12 deletions keploy/test-set-0/tests/test-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,47 @@ spec:
Accept: '*/*'
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: "134"
Content-Length: "899"
Content-Type: application/json
Host: localhost:9000
Postman-Token: b6754573-d282-4d9f-a987-e4dce5da304c
Postman-Token: 8d5c0e04-9ed5-4089-b0d8-f52b1b52d6d2
User-Agent: PostmanRuntime/7.37.3
body: '{"query":"mutation SignIn {\n signIn(email: \"[email protected]\", password: \"wednesdaySolutions\") {\n token\n }\n}"}'
timestamp: 2024-06-26T07:58:10.881570936Z
body: |-
{"query":"query Users(\n $usersAfter: Int\n $usersFirst: Int\n $usersBefore: Int\n $usersLast: Int\n $usersLimit: Int!\n $usersOrder: String\n $usersWhere: SequelizeJSON\n $usersOffset: Int!\n) {\n users(\n after: $usersAfter\n first: $usersFirst\n before: $usersBefore\n last: $usersLast\n limit: $usersLimit\n order: $usersOrder\n where: $usersWhere\n offset: $usersOffset\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges {\n node {\n firstName\n lastName\n id\n email\n createdAt\n updatedAt\n deletedAt\n }\n cursor\n }\n total\n }\n}\n","variables":{
"usersAfter": null,
"usersFirst": 10,
"usersBefore": null,
"usersLast": null,
"usersLimit": 10,
"usersOrder":"id",
"usersWhere": {},
"usersOffset": 0
}
}
timestamp: 2024-06-28T06:07:27.430153152Z
resp:
status_code: 200
header:
Cache-Control: no-store
Connection: keep-alive
Content-Length: "448"
Content-Length: "2023"
Content-Type: application/json; charset=utf-8
Date: Wed, 26 Jun 2024 07:58:10 GMT
Etag: W/"1c0-4VkjzPwyKEH0Xy9lGO28f/cyPk4"
Date: Fri, 28 Jun 2024 06:07:27 GMT
Etag: W/"7e7-thYsq787KGx72EHHhMdFrvzxN1c"
Keep-Alive: timeout=5
X-Powered-By: Express
body: |
{"data":{"signIn":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoxLCJmaXJzdE5hbWUiOiJTdGVybGluZyIsImxhc3ROYW1lIjoiU2F1ZXIiLCJlbWFpbCI6Ik1hc29uLkdvbGRuZXI0OUBob3RtYWlsLmNvbSIsInBhc3N3b3JkIjoiZGFhOTMyMGY1YzU4NDRiODRiMjhlMDE2YjRiOGM0MGIiLCJjcmVhdGVkQXQiOiIyMDIzLTEyLTA4VDE4OjE2OjQxLjYzOFoiLCJ1cGRhdGVkQXQiOm51bGwsImRlbGV0ZWRBdCI6bnVsbH0sImlhdCI6MTcxOTM4ODY5MCwiZXhwIjoxNzE5NDc1MDkwfQ.8Yxg2Kw003y_63gE31qaCEn9JilneGnXif3TbFcmMH8"}}}
{"data":{"users":{"pageInfo":{"hasNextPage":true,"hasPreviousPage":false,"startCursor":"WzEsMF0=","endCursor":"WzEwLDld"},"edges":[{"node":{"firstName":"Libbie","lastName":"Bode","id":"1","email":"[email protected]","createdAt":"2023-08-23T10:49:56.620Z","updatedAt":null,"deletedAt":null},"cursor":"WzEsMF0="},{"node":{"firstName":"Henri","lastName":"Hamill","id":"2","email":"[email protected]","createdAt":"2023-01-26T11:56:30.499Z","updatedAt":null,"deletedAt":null},"cursor":"WzIsMV0="},{"node":{"firstName":"Davion","lastName":"Sporer","id":"3","email":"[email protected]","createdAt":"2022-09-03T17:05:41.586Z","updatedAt":null,"deletedAt":null},"cursor":"WzMsMl0="},{"node":{"firstName":"Vincenzo","lastName":"Willms","id":"4","email":"[email protected]","createdAt":"2023-11-13T12:17:25.446Z","updatedAt":null,"deletedAt":null},"cursor":"WzQsM10="},{"node":{"firstName":"Karlee","lastName":"Roob","id":"5","email":"[email protected]","createdAt":"2024-05-28T18:19:57.048Z","updatedAt":null,"deletedAt":null},"cursor":"WzUsNF0="},{"node":{"firstName":"Garth","lastName":"Casper","id":"6","email":"[email protected]","createdAt":"2023-01-09T01:14:28.958Z","updatedAt":null,"deletedAt":null},"cursor":"WzYsNV0="},{"node":{"firstName":"Kavon","lastName":"Reinger","id":"7","email":"[email protected]","createdAt":"2023-02-11T14:20:02.648Z","updatedAt":null,"deletedAt":null},"cursor":"WzcsNl0="},{"node":{"firstName":"Luz","lastName":"Douglas","id":"8","email":"[email protected]","createdAt":"2023-08-10T13:07:21.464Z","updatedAt":null,"deletedAt":null},"cursor":"WzgsN10="},{"node":{"firstName":"Shayna","lastName":"Little","id":"9","email":"[email protected]","createdAt":"2024-06-18T11:38:56.084Z","updatedAt":null,"deletedAt":null},"cursor":"WzksOF0="},{"node":{"firstName":"Guadalupe","lastName":"Crist","id":"10","email":"[email protected]","createdAt":"2024-05-14T13:07:42.900Z","updatedAt":null,"deletedAt":null},"cursor":"WzEwLDld"}],"total":99}}}
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2024-06-26T07:58:12.96816984Z
timestamp: 2024-06-28T06:07:29.532200888Z
objects: []
assertions:
noise:
body.data.users.edges.node.createdAt: []
header.Date: []
created: 1719388692
created: 1719554849
curl: |-
curl --request POST \
--url http://localhost:9000/graphql \
Expand All @@ -50,5 +62,15 @@ curl: |-
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime/7.37.3' \
--header 'Accept: */*' \
--header 'Postman-Token: b6754573-d282-4d9f-a987-e4dce5da304c' \
--data '{"query":"mutation SignIn {\n signIn(email: \"[email protected]\", password: \"wednesdaySolutions\") {\n token\n }\n}"}'
--header 'Postman-Token: 8d5c0e04-9ed5-4089-b0d8-f52b1b52d6d2' \
--data '{"query":"query Users(\n $usersAfter: Int\n $usersFirst: Int\n $usersBefore: Int\n $usersLast: Int\n $usersLimit: Int!\n $usersOrder: String\n $usersWhere: SequelizeJSON\n $usersOffset: Int!\n) {\n users(\n after: $usersAfter\n first: $usersFirst\n before: $usersBefore\n last: $usersLast\n limit: $usersLimit\n order: $usersOrder\n where: $usersWhere\n offset: $usersOffset\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges {\n node {\n firstName\n lastName\n id\n email\n createdAt\n updatedAt\n deletedAt\n }\n cursor\n }\n total\n }\n}\n","variables":{
"usersAfter": null,
"usersFirst": 10,
"usersBefore": null,
"usersLast": null,
"usersLimit": 10,
"usersOrder":"id",
"usersWhere": {},
"usersOffset": 0
}
}'
Loading

0 comments on commit 6a8fd2e

Please sign in to comment.