Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions http-sse/keploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,22 @@ test:
url:
"localhost:8003": "localhost:8000"
"localhost:8004": "localhost:8000"
sse:
url:
sse:
url:
"doubt.local": "localhost:8047"
port-mapping-test:
port:
8050: 8000
delay: 5
host: ""
port: 0
grpcPort: 0
ssePort: 8047
protocol:
http:
port: 8000
sse:
port: 8047
apiTimeout: 5
skipCoverage: false
coverageReportPath: ""
Expand Down
41 changes: 41 additions & 0 deletions http-sse/keploy/port-config-test/tests/test-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Keploy (3-dev)
version: api.keploy.io/v1beta1
kind: Http
name: test-1
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:8000/health
header:
Accept: '*/*'
Host: localhost:8000
User-Agent: curl/8.5.0
body: ""
timestamp: 2026-03-26T12:50:44.335119622Z
resp:
status_code: 200
header:
Content-Length: "24"
Content-Type: application/json
Date: Thu, 26 Mar 2026 12:50:44 GMT
body: |
{"ok":true,"port":8000}
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2026-03-26T12:50:44.335453935Z
objects: []
assertions:
noise:
header.Date: []
created: 1774529444
app_port: 8000
curl: |
curl --request GET \
--url http://localhost:8000/health \
--header 'Accept: */*' \
--header 'Host: localhost:8000' \
--header 'User-Agent: curl/8.5.0' \
41 changes: 41 additions & 0 deletions http-sse/keploy/port-config-test/tests/test-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Keploy (3-dev)
version: api.keploy.io/v1beta1
kind: Http
name: test-2
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:8000/health
header:
Accept: '*/*'
Host: localhost:8000
User-Agent: curl/8.5.0
body: ""
timestamp: 2026-03-26T12:50:47.341688677Z
resp:
status_code: 200
header:
Content-Length: "24"
Content-Type: application/json
Date: Thu, 26 Mar 2026 12:50:47 GMT
body: |
{"ok":true,"port":8000}
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2026-03-26T12:50:47.341870089Z
objects: []
assertions:
noise:
header.Date: []
created: 1774529447
app_port: 8000
curl: |
curl --request GET \
--url http://localhost:8000/health \
--header 'User-Agent: curl/8.5.0' \
--header 'Accept: */*' \
--header 'Host: localhost:8000' \
41 changes: 41 additions & 0 deletions http-sse/keploy/port-config-test/tests/test-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Keploy (3-dev)
version: api.keploy.io/v1beta1
kind: Http
name: test-3
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:8000/api/hello
header:
Accept: '*/*'
Host: localhost:8000
User-Agent: curl/8.5.0
body: ""
timestamp: 2026-03-26T12:50:48.346822466Z
resp:
status_code: 200
header:
Content-Length: "38"
Content-Type: application/json
Date: Thu, 26 Mar 2026 12:50:48 GMT
body: |
{"msg":"hello from http","port":8000}
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2026-03-26T12:50:48.347062708Z
objects: []
assertions:
noise:
header.Date: []
created: 1774529448
app_port: 8000
curl: |
curl --request GET \
--url http://localhost:8000/api/hello \
--header 'Host: localhost:8000' \
--header 'User-Agent: curl/8.5.0' \
--header 'Accept: */*' \
43 changes: 43 additions & 0 deletions http-sse/keploy/port-config-test/tests/test-4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated by Keploy (3-dev)
version: api.keploy.io/v1beta1
kind: Http
name: test-4
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:8000/api/echo?msg=porttest
url_params:
msg: porttest
header:
Accept: '*/*'
Host: localhost:8000
User-Agent: curl/8.5.0
body: ""
timestamp: 2026-03-26T12:50:49.352282873Z
resp:
status_code: 200
header:
Content-Length: "32"
Content-Type: application/json
Date: Thu, 26 Mar 2026 12:50:49 GMT
body: |
{"echo":"porttest","port":8000}
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2026-03-26T12:50:49.352454614Z
objects: []
assertions:
noise:
header.Date: []
created: 1774529449
app_port: 8000
curl: |
curl --request GET \
--url http://localhost:8000/api/echo?msg=porttest \
--header 'User-Agent: curl/8.5.0' \
--header 'Accept: */*' \
--header 'Host: localhost:8000' \
44 changes: 44 additions & 0 deletions http-sse/keploy/port-config-test/tests/test-5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated by Keploy (3-dev)
version: api.keploy.io/v1beta1
kind: Http
name: test-5
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:8000/api/add?a=10&b=20
url_params:
a: "10"
b: "20"
header:
Accept: '*/*'
Host: localhost:8000
User-Agent: curl/8.5.0
body: ""
timestamp: 2026-03-26T12:50:50.358125729Z
resp:
status_code: 200
header:
Content-Length: "37"
Content-Type: application/json
Date: Thu, 26 Mar 2026 12:50:50 GMT
body: |
{"a":10,"b":20,"port":8000,"sum":30}
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2026-03-26T12:50:50.358338811Z
objects: []
assertions:
noise:
header.Date: []
created: 1774529450
app_port: 8000
curl: |
curl --request GET \
--url http://localhost:8000/api/add?a=10&b=20 \
--header 'Accept: */*' \
--header 'Host: localhost:8000' \
--header 'User-Agent: curl/8.5.0' \
41 changes: 41 additions & 0 deletions http-sse/keploy/port-config-test/tests/test-6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Keploy (3-dev)
version: api.keploy.io/v1beta1
kind: Http
name: test-6
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:8000/api/resource/99
header:
Accept: '*/*'
Host: localhost:8000
User-Agent: curl/8.5.0
body: ""
timestamp: 2026-03-26T12:50:51.363736261Z
resp:
status_code: 200
header:
Content-Length: "51"
Content-Type: application/json
Date: Thu, 26 Mar 2026 12:50:51 GMT
body: |
{"fixed":true,"id":"99","port":8000,"type":"demo"}
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2026-03-26T12:50:51.363948263Z
objects: []
assertions:
noise:
header.Date: []
created: 1774529451
app_port: 8000
curl: |
curl --request GET \
--url http://localhost:8000/api/resource/99 \
--header 'Accept: */*' \
--header 'Host: localhost:8000' \
--header 'User-Agent: curl/8.5.0' \
108 changes: 108 additions & 0 deletions http-sse/keploy/port-config-test/tests/test-7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Generated by Keploy (3-dev)
version: api.keploy.io/v1beta1
kind: Http
name: test-7
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:8047/subscribe/student/events?doubtId=port-test-1
url_params:
doubtId: port-test-1
header:
Accept: text/event-stream
Host: localhost:8047
User-Agent: curl/8.5.0
body: ""
timestamp: 2026-03-26T12:50:52.371652738Z
resp:
status_code: 200
header:
Access-Control-Allow-Origin: '*'
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream; charset=utf-8
Date: Thu, 26 Mar 2026 12:50:52 GMT
body:
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: TICKER
data: '[{"message_id":"ticker-1","message_type":"TICKER","message":{"id":"port-test-1","kind":"student","timestamp":1774529452371}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-1","message_type":"SYSTEM","message":{"timestamp":1774529453375,"title":"student stream message 1"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-2","message_type":"SYSTEM","message":{"timestamp":1774529454379,"title":"student stream message 2"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-3","message_type":"SYSTEM","message":{"timestamp":1774529455383,"title":"student stream message 3"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-4","message_type":"SYSTEM","message":{"timestamp":1774529456385,"title":"student stream message 4"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-5","message_type":"SYSTEM","message":{"timestamp":1774529457388,"title":"student stream message 5"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-6","message_type":"SYSTEM","message":{"timestamp":1774529458394,"title":"student stream message 6"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-7","message_type":"SYSTEM","message":{"timestamp":1774529459397,"title":"student stream message 7"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-8","message_type":"SYSTEM","message":{"timestamp":1774529460401,"title":"student stream message 8"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-9","message_type":"SYSTEM","message":{"timestamp":1774529461405,"title":"student stream message 9"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-10","message_type":"SYSTEM","message":{"timestamp":1774529462406,"title":"student stream message 10"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-11","message_type":"SYSTEM","message":{"timestamp":1774529463406,"title":"student stream message 11"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-12","message_type":"SYSTEM","message":{"timestamp":1774529464407,"title":"student stream message 12"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-13","message_type":"SYSTEM","message":{"timestamp":1774529465410,"title":"student stream message 13"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-14","message_type":"SYSTEM","message":{"timestamp":1774529466414,"title":"student stream message 14"}}]'
- ts: "2026-03-26T12:50:52.371930021Z"
data:
event: message
data: '[{"message_id":"msg-15","message_type":"SYSTEM","message":{"timestamp":1774529467417,"title":"student stream message 15"}}]'
status_message: OK
proto_major: 0
proto_minor: 0
timestamp: 2026-03-26T12:50:52.371930021Z
objects: []
assertions:
noise:
header.Date: []
created: 1774529467
app_port: 8047
curl: |
curl --request GET \
--url http://localhost:8047/subscribe/student/events?doubtId=port-test-1 \
--header 'Accept: text/event-stream' \
--header 'Host: localhost:8047' \
--header 'User-Agent: curl/8.5.0' \
Loading
Loading