Compare commits

...

7 commits

Author SHA1 Message Date
Ritik Jain 0170e70905
Merge f9478f12cb into 550cd3e1f8 2024-09-15 20:57:52 +05:30
Bishop Clark 550cd3e1f8
Update README.md (#2034)
'software', when used as a noun, is not a 'countable' type, and it does not get an article like 'a'.  It's like 'traffic'.
2024-09-06 15:49:53 +05:30
re-Tick f9478f12cb Merge branch 'master' into test-keploy-cli 2023-11-20 05:54:42 +00:00
re-Tick ea5b75a6b5 Merge branch 'master' of https://github.com/knadh/listmonk into test-keploy-cli 2023-11-14 23:03:40 +00:00
re-Tick b5fb2ed5fd feat: updates the postgres mocks in readable format
recorded new testcases and mocks with readable postgres queries and outputs so, it can be editable.

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
2023-11-03 03:11:44 +00:00
re-Tick 7d37f5a294 Merge branch 'master' of https://github.com/knadh/listmonk into test-keploy-cli 2023-10-27 06:55:45 +00:00
re-Tick 8a937987b1 test: records e2e tests for the apis using keploy cli
Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
2023-09-25 11:16:14 +00:00
14 changed files with 10453 additions and 1 deletions

View file

@ -48,7 +48,7 @@ __________________
## Developers ## Developers
listmonk is a free and open source software licensed under AGPLv3. If you are interested in contributing, refer to the [developer setup](https://listmonk.app/docs/developer-setup). The backend is written in Go and the frontend is Vue with Buefy for UI. listmonk is free and open source software licensed under AGPLv3. If you are interested in contributing, refer to the [developer setup](https://listmonk.app/docs/developer-setup). The backend is written in Go and the frontend is Vue with Buefy for UI.
## License ## License

9032
keploy/test-set-0/mocks.yaml Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,43 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-10
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/import/subscribers
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Host: localhost:9000
User-Agent: curl/7.81.0
body: ""
body_type: ""
timestamp: 2023-11-03T03:07:40.226434676Z
resp:
status_code: 200
header:
Content-Length: "60"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:07:40 GMT
body: |
{"data":{"name":"","total":0,"imported":0,"status":"none"}}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:07:42.612274231Z
objects: []
assertions:
noise:
- header.Date
created: 1698980862
curl: |
curl --request GET \
--url http://localhost:9000/api/import/subscribers \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \
--header 'Accept: */*' \
--header 'Host: localhost:9000' \

View file

@ -0,0 +1,54 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-11
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/campaigns?page=1&per_page=100
url_params:
page: "1"
per_page: "100"
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Host: localhost:9000
User-Agent: curl/7.81.0
body: ""
body_type: ""
timestamp: 2023-11-03T03:08:01.834541216Z
resp:
status_code: 200
header:
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:08:01 GMT
body: |
{"data":{"results":[{"id":3,"created_at":"2023-10-29T05:21:00.725321Z","updated_at":"2023-10-29T05:21:00.725321Z","views":0,"clicks":0,"bounces":0,"lists":[{"id":1,"name":"Default list"}],"media":[],"started_at":null,"to_send":5,"sent":0,"uuid":"0aadbf8e-b4d5-4ce1-9c3c-30080c2abba4","type":"regular","name":"Test campaign","subject":"Hello, world","from_email":"listmonk \u003cnoreply@listmonk.yoursite.com\u003e","body":"","altbody":null,"send_at":null,"status":"draft","content_type":"richtext","tags":["test"],"headers":[],"template_id":1,"messenger":"email","archive":false,"archive_template_id":1,"archive_meta":{}},{"id":2,"created_at":"2023-10-27T19:29:57.972866Z","updated_at":"2023-10-27T19:30:00.360103Z","views":0,"clicks":0,"bounces":0,"lists":[{"id":2,"name":"Opt-in list"}],"media":[],"started_at":null,"to_send":0,"sent":0,"uuid":"731e7b58-0e7b-4bc3-9738-146a740e1559","type":"regular","name":"ritik","subject":"ritik","from_email":"listmonk \u003cnoreply@listmonk.yoursite.com\u003e","body":"","altbody":null,"send_at":null,"status":"draft","content_type":"richtext","tags":[],"headers":[],"template_id":1,"messenger":"email","archive":false,"archive_template_id":1,"archive_meta":{}},{"id":1,"created_at":"2023-10-27T06:49:09.181995Z","updated_at":"2023-10-27T19:29:41.125794Z","views":0,"clicks":0,"bounces":0,"lists":[{"id":1,"name":"Default list"}],"media":[],"started_at":null,"to_send":0,"sent":0,"uuid":"4e01588d-48f0-4e4d-8ae5-ed753b063960","type":"regular","name":"Test campaign","subject":"Welcome to listmonk","from_email":"No Reply \u003cnoreply@yoursite.com\u003e","body":"\u003ch3\u003eHi {{ .Subscriber.FirstName }}!\u003c/h3\u003e\n\t\t\u003cp\u003eThis is a test e-mail campaign. Your second name is {{ .Subscriber.LastName }} and you are from {{ .Subscriber.Attribs.city }}.\u003c/p\u003e\n\t\t\u003cp\u003eHere is a \u003ca href=\"https://listmonk.app@TrackLink\"\u003etracked link\u003c/a\u003e.\u003c/p\u003e\n\t\t\u003cp\u003eUse the link icon in the editor toolbar or when writing raw HTML or Markdown,\n\t\t\tsimply suffix @TrackLink to the end of a URL to turn it into a tracking link. Example:\u003c/p\u003e\n\t\t\u003cpre\u003e\u0026lt;a href=\u0026quot;https:/\u0026zwnj;/listmonk.app\u0026#064;TrackLink\u0026quot;\u0026gt;\u0026lt;/a\u0026gt;\u003c/pre\u003e\n\t\t\u003cp\u003eFor help, refer to the \u003ca href=\"https://listmonk.app/docs\"\u003edocumentation\u003c/a\u003e.\u003c/p\u003e\n\t\t","altbody":null,"send_at":null,"status":"draft","content_type":"richtext","tags":["test-campaign"],"headers":[],"template_id":1,"messenger":"email","archive":false,"archive_template_id":2,"archive_meta":{}}],"query":"","total":3,"per_page":100,"page":1}}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:08:03.952825695Z
objects: []
assertions:
noise:
- body.data.results.status
- header.Date
- body.data.results.tags
- body.data.results.content_type
- body.data.results.type
- body.data.results.archive
- body.data.results.updated_at
- body.data.results.messenger
- body.data.results.created_at
- body.data.results.subject
created: 1698980883
curl: |
curl --request GET \
--url http://localhost:9000/api/campaigns?page=1&per_page=100 \
--header 'Accept: */*' \
--header 'Host: localhost:9000' \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \

View file

@ -0,0 +1,49 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-2
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/subscribers/1
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Host: localhost:9000
User-Agent: curl/7.81.0
body: ""
body_type: ""
timestamp: 2023-11-03T03:04:07.055305186Z
resp:
status_code: 200
header:
Content-Length: "706"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:04:07 GMT
body: |
{"data":{"id":1,"created_at":"2023-10-27T06:49:09.178449Z","updated_at":"2023-11-03T02:58:43.30528Z","uuid":"1d69593c-bf88-4045-8fa4-1f8f15519a79","email":"john@example.com","name":"John Doe","attribs":{"city":"Bengaluru","good":true,"type":"known"},"status":"blocklisted","lists":[{"subscription_status":"unsubscribed","subscription_created_at":"2023-10-27T06:49:09.178449+00:00","subscription_updated_at":"2023-11-03T02:58:43.30528+00:00","subscription_meta":{},"id":1,"uuid":"c5977ddf-bfd4-438f-aaa1-baf6fde450b0","name":"Default list","type":"private","optin":"single","tags":["test"],"description":"","created_at":"2023-10-27T06:49:09.177178+00:00","updated_at":"2023-10-27T06:49:09.177178+00:00"}]}}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:04:09.521778611Z
objects: []
assertions:
noise:
- body.data.created_at
- body.data.updated_at
- header.Date
- body.data.lists.subscription_updated_at
- body.data.lists.subscription_created_at
- body.data.lists.created_at
- body.data.lists.updated_at
created: 1698980649
curl: |
curl --request GET \
--url http://localhost:9000/api/subscribers/1 \
--header 'Host: localhost:9000' \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \
--header 'Accept: */*' \

View file

@ -0,0 +1,47 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-3
spec:
metadata: {}
req:
method: POST
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/subscribers
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Content-Length: "169"
Content-Type: application/json
Host: localhost:9000
User-Agent: curl/7.81.0
body: '{"email":"subsriber@domain.com","name":"The Subscriber","status":"enabled","lists":[1],"attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}}}'
body_type: ""
timestamp: 2023-11-03T03:04:34.068677564Z
resp:
status_code: 409
header:
Content-Length: "37"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:04:34 GMT
body: |
{"message":"E-mail already exists."}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:04:36.904712809Z
objects: []
assertions:
noise:
- header.Date
created: 1698980676
curl: |-
curl --request POST \
--url http://localhost:9000/api/subscribers \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--header 'Host: localhost:9000' \
--data '{"email":"subsriber@domain.com","name":"The Subscriber","status":"enabled","lists":[1],"attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}}}'

View file

@ -0,0 +1,47 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-4
spec:
metadata: {}
req:
method: POST
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/subscribers
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Content-Length: "172"
Content-Type: application/json
Host: localhost:9000
User-Agent: curl/7.81.0
body: '{"email":"subsriber123@domain.com","name":"The Subscriber","status":"enabled","lists":[1],"attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}}}'
body_type: ""
timestamp: 2023-11-03T03:04:47.229569651Z
resp:
status_code: 409
header:
Content-Length: "37"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:04:47 GMT
body: |
{"message":"E-mail already exists."}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:04:50.19800127Z
objects: []
assertions:
noise:
- header.Date
created: 1698980690
curl: |-
curl --request POST \
--url http://localhost:9000/api/subscribers \
--header 'Content-Type: application/json' \
--header 'Host: localhost:9000' \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \
--header 'Accept: */*' \
--data '{"email":"subsriber123@domain.com","name":"The Subscriber","status":"enabled","lists":[1],"attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}}}'

View file

@ -0,0 +1,55 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-5
spec:
metadata: {}
req:
method: POST
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/subscribers
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Content-Length: "175"
Content-Type: application/json
Host: localhost:9000
User-Agent: curl/7.81.0
body: '{"email":"subsriber123456@domain.com","name":"The Subscriber","status":"enabled","lists":[1],"attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}}}'
body_type: ""
timestamp: 2023-11-03T03:04:54.659661351Z
resp:
status_code: 200
header:
Content-Length: "744"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:04:54 GMT
body: |
{"data":{"id":41,"created_at":"2023-11-03T03:04:54.660042Z","updated_at":"2023-11-03T03:04:54.660042Z","uuid":"21dc0f45-c761-4ab0-bcb5-7546954a799e","email":"subsriber123456@domain.com","name":"The Subscriber","attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}},"status":"enabled","lists":[{"subscription_status":"unconfirmed","subscription_created_at":"2023-11-03T03:04:54.660042+00:00","subscription_updated_at":"2023-11-03T03:04:54.660042+00:00","subscription_meta":{},"id":1,"uuid":"c5977ddf-bfd4-438f-aaa1-baf6fde450b0","name":"Default list","type":"private","optin":"single","tags":["test"],"description":"","created_at":"2023-10-27T06:49:09.177178+00:00","updated_at":"2023-10-27T06:49:09.177178+00:00"}]}}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:04:57.60476766Z
objects: []
assertions:
noise:
- header.Date
- body.data.id
- body.data.lists.subscription_updated_at
- body.data.updated_at
- body.data.created_at
- body.data.lists.updated_at
- body.data.lists.subscription_created_at
- body.data.lists.created_at
- body.data.attribs.stack.languages
created: 1698980697
curl: |-
curl --request POST \
--url http://localhost:9000/api/subscribers \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--header 'Host: localhost:9000' \
--data '{"email":"subsriber123456@domain.com","name":"The Subscriber","status":"enabled","lists":[1],"attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}}}'

View file

@ -0,0 +1,47 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-6
spec:
metadata: {}
req:
method: PUT
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/subscribers/lists
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Content-Length: "88"
Content-Type: application/x-www-form-urlencoded
Host: localhost:9000
User-Agent: curl/7.81.0
body: '{"ids": [1, 2, 3], "action": "add", "target_list_ids": [4, 5, 6], "status": "confirmed"}'
body_type: ""
timestamp: 2023-11-03T03:05:17.060435617Z
resp:
status_code: 400
header:
Content-Length: "28"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:05:17 GMT
body: |
{"message":"No IDs given."}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:05:19.980912702Z
objects: []
assertions:
noise:
- header.Date
created: 1698980719
curl: |-
curl --request PUT \
--url http://localhost:9000/api/subscribers/lists \
--header 'Host: localhost:9000' \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \
--header 'Accept: */*' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data '{"ids": [1, 2, 3], "action": "add", "target_list_ids": [4, 5, 6], "status": "confirmed"}'

View file

@ -0,0 +1,43 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-7
spec:
metadata: {}
req:
method: DELETE
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/subscribers/19
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Host: localhost:9000
User-Agent: curl/7.81.0
body: ""
body_type: ""
timestamp: 2023-11-03T03:05:47.048109129Z
resp:
status_code: 200
header:
Content-Length: "14"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:05:47 GMT
body: |
{"data":true}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:05:49.4182335Z
objects: []
assertions:
noise:
- header.Date
created: 1698980749
curl: |
curl --request DELETE \
--url http://localhost:9000/api/subscribers/19 \
--header 'Host: localhost:9000' \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \
--header 'Accept: */*' \

View file

@ -0,0 +1,50 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-8
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/lists?page=1&per_page=100
url_params:
page: "1"
per_page: "100"
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Host: localhost:9000
User-Agent: curl/7.81.0
body: ""
body_type: ""
timestamp: 2023-11-03T03:06:23.046582343Z
resp:
status_code: 200
header:
Content-Length: "1485"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:06:23 GMT
body: |
{"data":{"results":[{"id":4,"created_at":"2023-10-28T05:44:41.190181Z","updated_at":"2023-10-28T05:44:41.190181Z","uuid":"7fc53e79-8734-4c4e-a43b-a890809b8ff6","name":"shivani@mail.com","type":"private","optin":"single","tags":[],"description":"","subscriber_count":1,"subscriber_statuses":{"unconfirmed":1},"subscription_created_at":null,"subscription_updated_at":null},{"id":3,"created_at":"2023-10-27T19:06:44.682439Z","updated_at":"2023-10-27T19:06:44.682439Z","uuid":"3e6e3bfa-d9d2-4bed-a014-c16497bfdcb7","name":"Ritik Jain","type":"private","optin":"single","tags":[],"description":"","subscriber_count":2,"subscriber_statuses":{"unconfirmed":2},"subscription_created_at":null,"subscription_updated_at":null},{"id":2,"created_at":"2023-10-27T06:49:09.177856Z","updated_at":"2023-10-27T06:49:09.177856Z","uuid":"b1349b44-3ed0-4f9c-bc85-58f2a9e8cc97","name":"Opt-in list","type":"public","optin":"double","tags":["test"],"description":"","subscriber_count":5,"subscriber_statuses":{"unconfirmed":5},"subscription_created_at":null,"subscription_updated_at":null},{"id":1,"created_at":"2023-10-27T06:49:09.177178Z","updated_at":"2023-10-27T06:49:09.177178Z","uuid":"c5977ddf-bfd4-438f-aaa1-baf6fde450b0","name":"Default list","type":"private","optin":"single","tags":["test"],"description":"","subscriber_count":8,"subscriber_statuses":{"unconfirmed":7,"unsubscribed":1},"subscription_created_at":null,"subscription_updated_at":null}],"query":"","total":4,"per_page":100,"page":1}}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:06:25.777419593Z
objects: []
assertions:
noise:
- header.Content-Length
- body.data.results.tags
- header.Date
- body.data.results.created_at
- body.data.results.updated_at
created: 1698980785
curl: |
curl --request GET \
--url http://localhost:9000/api/lists?page=1&per_page=100 \
--header 'Accept: */*' \
--header 'Host: localhost:9000' \
--header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \
--header 'User-Agent: curl/7.81.0' \

View file

@ -0,0 +1,39 @@
version: api.keploy.io/v1beta2
kind: Http
name: test-9
spec:
metadata: {}
req:
method: PUT
proto_major: 1
proto_minor: 1
url: http://localhost:9000/api/lists/5
header:
Accept: '*/*'
Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
Content-Length: "257"
Content-Type: multipart/form-data; boundary=------------------------4240582b5838762f
Host: localhost:9000
User-Agent: curl/7.81.0
body: "--------------------------4240582b5838762f\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nmodified test list\r\n--------------------------4240582b5838762f\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nprivate\r\n--------------------------4240582b5838762f--\r\n"
body_type: ""
timestamp: 2023-11-03T03:07:09.160668734Z
resp:
status_code: 400
header:
Content-Length: "27"
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Nov 2023 03:07:09 GMT
body: |
{"message":"Invalid name"}
body_type: ""
status_message: ""
proto_major: 0
proto_minor: 0
timestamp: 2023-11-03T03:07:11.189043557Z
objects: []
assertions:
noise:
- header.Date
created: 1698980831
curl: "curl --request PUT \\\n --url http://localhost:9000/api/lists/5 \\\n --header 'Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=' \\\n --header 'User-Agent: curl/7.81.0' \\\n --header 'Accept: */*' \\\n --header 'Content-Type: multipart/form-data; boundary=------------------------4240582b5838762f' \\\n --header 'Host: localhost:9000' \\\n --data '--------------------------4240582b5838762f\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nmodified test list\r\n--------------------------4240582b5838762f\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nprivate\r\n--------------------------4240582b5838762f--\r\n'"

891
keploy/testReports/report-1.yaml Executable file

File diff suppressed because one or more lines are too long