Skip to content

Commit

Permalink
Feat:Added Keploy tets
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-wedensday committed Mar 14, 2024
1 parent 0901036 commit 97965c6
Show file tree
Hide file tree
Showing 33 changed files with 9,572 additions and 13,034 deletions.
1,327 changes: 1,327 additions & 0 deletions keploy/test-set-0/mocks.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ spec:
Upgrade-Insecure-Requests: "1"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
body: ""
timestamp: 2024-03-13T09:38:12.701828851Z
timestamp: 2024-03-14T16:49:35.50901918Z
resp:
status_code: 200
header:
Content-Length: "1657"
Content-Type: text/html; charset=UTF-8
Date: Wed, 13 Mar 2024 09:38:12 GMT
Date: Thu, 14 Mar 2024 16:49:35 GMT
Strict-Transport-Security: max-age=5184000; includeSubDomains
Vary: Origin
X-Content-Type-Options: nosniff
X-Dns-Prefetch-Control: "off"
X-Download-Options: noopen
X-Frame-Options: DENY
X-Request-Id: MH7zleQ1L8MM7esXMjJwlh1aWGZpKImu
X-Request-Id: tFpZOTxhgjoDKB3dtCEHSZVvHF4leu4m
X-Xss-Protection: 1; mode=block
body: |
<!DOCTYPE html>
Expand Down Expand Up @@ -106,30 +106,30 @@ spec:
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2024-03-13T09:38:12.788777379Z
timestamp: 2024-03-14T16:49:35.634831388Z
objects: []
assertions:
noise:
header.Content-Length: []
header.Date: []
created: 1710322692
created: 1710434975
curl: |
curl --request GET \
--url http://localhost:9000/playground \
--header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'Upgrade-Insecure-Requests: 1' \
--header 'Accept-Encoding: gzip, deflate, br, zstd' \
--header 'Sec-Fetch-Site: none' \
--header 'Cookie: __hstc=181257784.e0fa10c698a35e55de1a39067df22f30.1709635044687.1709635044687.1709635044687.1; hubspotutk=e0fa10c698a35e55de1a39067df22f30; messagesUtk=91ea843e27d3455f86995fa0c541b5e0' \
--header 'Host: localhost:9000' \
--header 'Purpose: prefetch' \
--header 'Connection: keep-alive' \
--header 'Sec-Ch-Ua-Platform: "macOS"' \
--header 'Upgrade-Insecure-Requests: 1' \
--header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'Sec-Fetch-Mode: navigate' \
--header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'Sec-Ch-Ua-Mobile: ?0' \
--header 'Sec-Fetch-Site: none' \
--header 'Sec-Purpose: prefetch;prerender' \
--header 'Sec-Ch-Ua-Platform: "macOS"' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Sec-Fetch-User: ?1' \
--header 'Connection: keep-alive' \
--header 'Sec-Fetch-Dest: document' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
--header 'Sec-Fetch-User: ?1' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Host: localhost:9000' \
--header 'Accept-Encoding: gzip, deflate, br, zstd' \
--header 'Sec-Purpose: prefetch;prerender' \
--header 'Sec-Fetch-Mode: navigate' \

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ spec:
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
body: ""
timestamp: 2024-03-13T09:38:13.836931477Z
timestamp: 2024-03-14T16:49:36.881364055Z
resp:
status_code: 404
header:
Content-Length: "29"
Content-Type: application/json; charset=UTF-8
Date: Wed, 13 Mar 2024 09:38:13 GMT
Date: Thu, 14 Mar 2024 16:49:36 GMT
Strict-Transport-Security: max-age=5184000; includeSubDomains
Vary: Origin
X-Content-Type-Options: nosniff
X-Dns-Prefetch-Control: "off"
X-Download-Options: noopen
X-Frame-Options: DENY
X-Request-Id: TPE0ZpiEAspWgoshKKH9WGFlLvkjBfKw
X-Request-Id: ea8MFFjZnrYJPiQSNi8F5j6zAKAf9lt1
X-Xss-Protection: 1; mode=block
body: |
{
Expand All @@ -46,26 +46,26 @@ spec:
status_message: Not Found
proto_major: 0
proto_minor: 0
timestamp: 2024-03-13T09:38:15.898094339Z
timestamp: 2024-03-14T16:49:38.970756709Z
objects: []
assertions:
noise:
header.Date: []
created: 1710322695
created: 1710434978
curl: |
curl --request GET \
--url http://localhost:9000/favicon.ico \
--header 'Host: localhost:9000' \
--header 'Connection: keep-alive' \
--header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'Sec-Ch-Ua-Platform: "macOS"' \
--header 'Sec-Ch-Ua-Mobile: ?0' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
--header 'Referer: http://localhost:9000/playground' \
--header 'Host: localhost:9000' \
--header 'Sec-Fetch-Site: same-origin' \
--header 'Sec-Fetch-Mode: no-cors' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Sec-Fetch-Dest: image' \
--header 'Sec-Ch-Ua-Mobile: ?0' \
--header 'Sec-Fetch-Site: same-origin' \
--header 'Accept-Encoding: gzip, deflate, br, zstd' \
--header 'Cookie: __hstc=181257784.e0fa10c698a35e55de1a39067df22f30.1709635044687.1709635044687.1709635044687.1; hubspotutk=e0fa10c698a35e55de1a39067df22f30; messagesUtk=91ea843e27d3455f86995fa0c541b5e0' \
--header 'Sec-Ch-Ua-Platform: "macOS"' \
--header 'Sec-Fetch-Mode: no-cors' \
--header 'Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8' \
--header 'Referer: http://localhost:9000/playground' \
--header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
135 changes: 135 additions & 0 deletions keploy/test-set-0/tests/test-4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
version: api.keploy.io/v1beta1
kind: Http
name: test-4
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:9000/playground
header:
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Connection: keep-alive
Cookie: __hstc=181257784.e0fa10c698a35e55de1a39067df22f30.1709635044687.1709635044687.1709635044687.1; hubspotutk=e0fa10c698a35e55de1a39067df22f30; messagesUtk=91ea843e27d3455f86995fa0c541b5e0
Host: localhost:9000
Purpose: prefetch
Sec-Ch-Ua: '"Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"'
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: '"macOS"'
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Sec-Purpose: prefetch;prerender
Upgrade-Insecure-Requests: "1"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
body: ""
timestamp: 2024-03-14T16:49:45.01391985Z
resp:
status_code: 200
header:
Content-Length: "1657"
Content-Type: text/html; charset=UTF-8
Date: Thu, 14 Mar 2024 16:49:45 GMT
Strict-Transport-Security: max-age=5184000; includeSubDomains
Vary: Origin
X-Content-Type-Options: nosniff
X-Dns-Prefetch-Control: "off"
X-Download-Options: noopen
X-Frame-Options: DENY
X-Request-Id: dg22GPmVBy3j201KUlKQAxWHTR5KGwyn
X-Xss-Protection: 1; mode=block
body: |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>GraphQL playground</title>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js"
integrity="sha256-Ipu/TQ50iCCVZBUsZyNJfxrDk0E2yhaEIz0vqI&#43;kFG8="
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.production.min.js"
integrity="sha256-nbMykgB6tsOFJ7OdVmPpdqMFVk4ZsqWocT6issAPUF0="
crossorigin="anonymous"
></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/graphiql.min.css"
integrity="sha256-gQryfbGYeYFxnJYnfPStPYFt0&#43;uv8RP8Dm&#43;&#43;eh00G9c="
crossorigin="anonymous"
/>
</head>
<body>
<div id="graphiql">Loading...</div>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/graphiql.min.js"
integrity="sha256-qQ6pw7LwTLC&#43;GfzN&#43;cJsYXfVWRKH9O5o7&#43;5H96gTJhQ="
crossorigin="anonymous"
></script>
<script>
const url = location.protocol + '//' + location.host + "/graphql";
const wsProto = location.protocol == 'https:' ? 'wss:' : 'ws:';
const subscriptionUrl = wsProto + '//' + location.host + "/graphql";
const fetcher = GraphiQL.createFetcher({ url, subscriptionUrl });
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: fetcher,
isHeadersEditorEnabled: true,
shouldPersistHeaders: true
}),
document.getElementById('graphiql'),
);
</script>
</body>
</html>
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2024-03-14T16:49:45.08785092Z
objects: []
assertions:
noise:
header.Content-Length: []
header.Date: []
created: 1710434985
curl: |
curl --request GET \
--url http://localhost:9000/playground \
--header 'Sec-Fetch-Dest: document' \
--header 'Purpose: prefetch' \
--header 'Sec-Fetch-Site: none' \
--header 'Sec-Fetch-User: ?1' \
--header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
--header 'Host: localhost:9000' \
--header 'Sec-Ch-Ua-Platform: "macOS"' \
--header 'Sec-Fetch-Mode: navigate' \
--header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'Upgrade-Insecure-Requests: 1' \
--header 'Accept-Encoding: gzip, deflate, br, zstd' \
--header 'Cookie: __hstc=181257784.e0fa10c698a35e55de1a39067df22f30.1709635044687.1709635044687.1709635044687.1; hubspotutk=e0fa10c698a35e55de1a39067df22f30; messagesUtk=91ea843e27d3455f86995fa0c541b5e0' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Connection: keep-alive' \
--header 'Sec-Purpose: prefetch;prerender' \
--header 'Sec-Ch-Ua-Mobile: ?0' \
89 changes: 89 additions & 0 deletions keploy/test-set-0/tests/test-5.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: api.keploy.io/v1beta1
kind: Http
name: test-11
name: test-6
spec:
metadata: {}
req:
Expand Down Expand Up @@ -28,52 +28,52 @@ spec:
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
body: '{"query":"query Me {\n me {\n id\n username\n firstName\n lastName\n }\n}","operationName":"Me"}'
timestamp: 2024-03-13T09:40:44.701729879Z
timestamp: 2024-03-14T16:49:50.988216687Z
resp:
status_code: 200
header:
Access-Control-Allow-Credentials: "true"
Access-Control-Allow-Origin: http://localhost:9000
Access-Control-Expose-Headers: Content-Length
Content-Length: "97"
Content-Length: "66"
Content-Type: application/json
Date: Wed, 13 Mar 2024 09:40:44 GMT
Date: Thu, 14 Mar 2024 16:49:50 GMT
Strict-Transport-Security: max-age=5184000; includeSubDomains
Vary: Origin
X-Content-Type-Options: nosniff
X-Dns-Prefetch-Control: "off"
X-Download-Options: noopen
X-Frame-Options: DENY
X-Request-Id: 2NOJqSrIwRi9nw7GnU9IqeTdcWWJobac
X-Request-Id: Uu2EhjCDhQfkMQB7LBz4SXZb4fXHThGB
X-Xss-Protection: 1; mode=block
body: '{"data":{"me":{"id":"1","username":"admin","firstName":"Mohammed Ali","lastName":"Chherawalla"}}}'
body: '{"errors":[{"message":"Invalid authorization token"}],"data":null}'
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2024-03-13T09:40:46.778502297Z
timestamp: 2024-03-14T16:49:52.996119007Z
objects: []
assertions:
noise:
header.Date: []
created: 1710322846
created: 1710434992
curl: |-
curl --request POST \
--url http://localhost:9000/graphql \
--header 'Sec-Fetch-Mode: cors' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Cookie: __hstc=181257784.e0fa10c698a35e55de1a39067df22f30.1709635044687.1709635044687.1709635044687.1; hubspotutk=e0fa10c698a35e55de1a39067df22f30; messagesUtk=91ea843e27d3455f86995fa0c541b5e0' \
--header 'Accept: application/json, multipart/mixed' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
--header 'Sec-Ch-Ua-Mobile: ?0' \
--header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'Sec-Fetch-Site: same-origin' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Connection: keep-alive' \
--header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'Content-Type: application/json' \
--header 'Host: localhost:9000' \
--header 'Sec-Ch-Ua-Platform: "macOS"' \
--header 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlIjoiam9obmRvZUBtYWlsLmNvbSIsImV4cCI6MTcxMDQwOTA5NiwiaWQiOjEsInJvbGUiOiJTVVBFUl9BRE1JTiIsInUiOiJhZG1pbiJ9.mg-lfE1Sc2QCa2hOp3G2p1qMaPMblO95mnSLOikHrgY' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
--header 'Accept-Encoding: gzip, deflate, br, zstd' \
--header 'Host: localhost:9000' \
--header 'Referer: http://localhost:9000/playground' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlIjoiam9obmRvZUBtYWlsLmNvbSIsImV4cCI6MTcxMDQwOTA5NiwiaWQiOjEsInJvbGUiOiJTVVBFUl9BRE1JTiIsInUiOiJhZG1pbiJ9.mg-lfE1Sc2QCa2hOp3G2p1qMaPMblO95mnSLOikHrgY' \
--header 'Origin: http://localhost:9000' \
--header 'Sec-Ch-Ua-Mobile: ?0' \
--header 'Accept-Encoding: gzip, deflate, br, zstd' \
--header 'Cookie: __hstc=181257784.e0fa10c698a35e55de1a39067df22f30.1709635044687.1709635044687.1709635044687.1; hubspotutk=e0fa10c698a35e55de1a39067df22f30; messagesUtk=91ea843e27d3455f86995fa0c541b5e0' \
--header 'Connection: keep-alive' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--data '{"query":"query Me {\n me {\n id\n username\n firstName\n lastName\n }\n}","operationName":"Me"}'
Loading

0 comments on commit 97965c6

Please sign in to comment.