Ver Fonte

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>
re-Tick há 1 ano atrás
pai
commit
b5fb2ed5fd

+ 1 - 1
docs/docs/content/apis/campaigns.md

@@ -208,6 +208,7 @@ Creates a new campaign.
 | `messenger`    | String    | Optional          | `email` or a custom messenger defined in the settings. If left empty, `email` is used.                 |
 | `template_id`  | Number    | Optional          | ID of the template to use. If left empty, the default template is used.                                |
 | `tags`         | []String  | Optional          | Array of string tags to mark the campaign.                                                             |
+| `headers`      | []Map     | Optional          | Array of key-value pairs to be sent as SMTP headers. eg: `[{"x-custom-header": "value"}]`.             |
 
 
 
@@ -264,7 +265,6 @@ Name          | Parameter Type | Data Type | Required/Optional | Description
 `campaign_id` | Path Parameter | Number    | Required          | The id value of the campaign whose status is to be modified.
 `status`      | Request Body   | String    | Required          | `scheduled`, `running`, `paused`, `cancelled`.
 
-
 ###### Note: 
  > * Only "scheduled" campaigns can be saved as "draft".
   * Only "draft" campaigns can be "scheduled".

+ 2 - 2
docs/docs/content/installation.md

@@ -25,7 +25,7 @@ Use the sample [docker-compose.yml](https://github.com/knadh/listmonk/blob/maste
 #### Easy Docker install
 
 ```bash
-mkdir listmonk-demo
+mkdir listmonk-demo && cd listmonk-demo
 sh -c "$(curl -fsSL https://raw.githubusercontent.com/knadh/listmonk/master/install-demo.sh)"
 ```
 
@@ -46,7 +46,7 @@ docker compose up -d demo-db demo-app
 This setup is recommended if you want to _quickly_ setup `listmonk` in production.
 
 ```bash
-mkdir listmonk
+mkdir listmonk && cd listmonk
 sh -c "$(curl -fsSL https://raw.githubusercontent.com/knadh/listmonk/master/install-prod.sh)"
 ```
 

+ 1 - 1
frontend/package.json

@@ -19,7 +19,7 @@
     "indent.js": "^0.3.5",
     "qs": "^6.10.1",
     "textversionjs": "^1.1.3",
-    "tinymce": "^5.10.7",
+    "tinymce": "^5.10.8",
     "turndown": "^7.0.0",
     "vue": "^2.6.12",
     "vue-i18n": "^8.22.2",

+ 104 - 17
frontend/yarn.lock

@@ -33,6 +33,14 @@
   dependencies:
     "@babel/highlight" "^7.18.6"
 
+"@babel/code-frame@^7.22.13":
+  version "7.22.13"
+  resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e"
+  integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==
+  dependencies:
+    "@babel/highlight" "^7.22.13"
+    chalk "^2.4.2"
+
 "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5":
   version "7.21.0"
   resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298"
@@ -69,6 +77,16 @@
     "@jridgewell/trace-mapping" "^0.3.17"
     jsesc "^2.5.1"
 
+"@babel/generator@^7.23.0":
+  version "7.23.0"
+  resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420"
+  integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==
+  dependencies:
+    "@babel/types" "^7.23.0"
+    "@jridgewell/gen-mapping" "^0.3.2"
+    "@jridgewell/trace-mapping" "^0.3.17"
+    jsesc "^2.5.1"
+
 "@babel/helper-annotate-as-pure@^7.18.6":
   version "7.18.6"
   resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb"
@@ -134,6 +152,11 @@
   resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be"
   integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==
 
+"@babel/helper-environment-visitor@^7.22.20":
+  version "7.22.20"
+  resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
+  integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==
+
 "@babel/helper-explode-assignable-expression@^7.18.6":
   version "7.18.6"
   resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096"
@@ -149,6 +172,14 @@
     "@babel/template" "^7.20.7"
     "@babel/types" "^7.21.0"
 
+"@babel/helper-function-name@^7.23.0":
+  version "7.23.0"
+  resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
+  integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
+  dependencies:
+    "@babel/template" "^7.22.15"
+    "@babel/types" "^7.23.0"
+
 "@babel/helper-hoist-variables@^7.18.6":
   version "7.18.6"
   resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
@@ -156,6 +187,13 @@
   dependencies:
     "@babel/types" "^7.18.6"
 
+"@babel/helper-hoist-variables@^7.22.5":
+  version "7.22.5"
+  resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb"
+  integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==
+  dependencies:
+    "@babel/types" "^7.22.5"
+
 "@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0":
   version "7.21.0"
   resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5"
@@ -239,16 +277,33 @@
   dependencies:
     "@babel/types" "^7.18.6"
 
+"@babel/helper-split-export-declaration@^7.22.6":
+  version "7.22.6"
+  resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c"
+  integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==
+  dependencies:
+    "@babel/types" "^7.22.5"
+
 "@babel/helper-string-parser@^7.19.4":
   version "7.19.4"
   resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63"
   integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==
 
+"@babel/helper-string-parser@^7.22.5":
+  version "7.22.5"
+  resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f"
+  integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==
+
 "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1":
   version "7.19.1"
   resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
   integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
 
+"@babel/helper-validator-identifier@^7.22.20":
+  version "7.22.20"
+  resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
+  integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==
+
 "@babel/helper-validator-option@^7.18.6":
   version "7.21.0"
   resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180"
@@ -282,11 +337,25 @@
     chalk "^2.0.0"
     js-tokens "^4.0.0"
 
+"@babel/highlight@^7.22.13":
+  version "7.22.20"
+  resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54"
+  integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==
+  dependencies:
+    "@babel/helper-validator-identifier" "^7.22.20"
+    chalk "^2.4.2"
+    js-tokens "^4.0.0"
+
 "@babel/parser@^7.18.4", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3", "@babel/parser@^7.7.0":
   version "7.21.3"
   resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3"
   integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==
 
+"@babel/parser@^7.22.15", "@babel/parser@^7.23.0":
+  version "7.23.0"
+  resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
+  integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
+
 "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6":
   version "7.18.6"
   resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2"
@@ -938,19 +1007,28 @@
     "@babel/parser" "^7.20.7"
     "@babel/types" "^7.20.7"
 
-"@babel/traverse@^7.0.0", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3", "@babel/traverse@^7.7.0":
-  version "7.21.3"
-  resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67"
-  integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==
+"@babel/template@^7.22.15":
+  version "7.22.15"
+  resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
+  integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
   dependencies:
-    "@babel/code-frame" "^7.18.6"
-    "@babel/generator" "^7.21.3"
-    "@babel/helper-environment-visitor" "^7.18.9"
-    "@babel/helper-function-name" "^7.21.0"
-    "@babel/helper-hoist-variables" "^7.18.6"
-    "@babel/helper-split-export-declaration" "^7.18.6"
-    "@babel/parser" "^7.21.3"
-    "@babel/types" "^7.21.3"
+    "@babel/code-frame" "^7.22.13"
+    "@babel/parser" "^7.22.15"
+    "@babel/types" "^7.22.15"
+
+"@babel/traverse@^7.0.0", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3", "@babel/traverse@^7.7.0":
+  version "7.23.2"
+  resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
+  integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
+  dependencies:
+    "@babel/code-frame" "^7.22.13"
+    "@babel/generator" "^7.23.0"
+    "@babel/helper-environment-visitor" "^7.22.20"
+    "@babel/helper-function-name" "^7.23.0"
+    "@babel/helper-hoist-variables" "^7.22.5"
+    "@babel/helper-split-export-declaration" "^7.22.6"
+    "@babel/parser" "^7.23.0"
+    "@babel/types" "^7.23.0"
     debug "^4.1.0"
     globals "^11.1.0"
 
@@ -963,6 +1041,15 @@
     "@babel/helper-validator-identifier" "^7.19.1"
     to-fast-properties "^2.0.0"
 
+"@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0":
+  version "7.23.0"
+  resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb"
+  integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==
+  dependencies:
+    "@babel/helper-string-parser" "^7.22.5"
+    "@babel/helper-validator-identifier" "^7.22.20"
+    to-fast-properties "^2.0.0"
+
 "@colors/colors@1.5.0":
   version "1.5.0"
   resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
@@ -2349,7 +2436,7 @@ caseless@~0.12.0:
   resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
   integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==
 
-chalk@^2.0.0, chalk@^2.1.0:
+chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2:
   version "2.4.2"
   resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
   integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -6926,10 +7013,10 @@ thunky@^1.0.2:
   resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d"
   integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==
 
-tinymce@^5.10.7:
-  version "5.10.7"
-  resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-5.10.7.tgz#d89d446f1962f2a1df6b2b70018ce475ec7ffb80"
-  integrity sha512-9UUjaO0R7FxcFo0oxnd1lMs7H+D0Eh+dDVo5hKbVe1a+VB0nit97vOqlinj+YwgoBDt6/DSCUoWqAYlLI8BLYA==
+tinymce@^5.10.8:
+  version "5.10.8"
+  resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-5.10.8.tgz#c85758fa3cca2cbb4b14dd037a0b315b6462c50e"
+  integrity sha512-iyoo3VGMAJhLMDdblAefKvYgBRk9kQi58GTwAmoieqsyggGsKZWlQl/YY6nTILFHUCA1FhYu0HdmM5YYjs17UQ==
 
 tmp@~0.2.1:
   version "0.2.1"

+ 6 - 10
i18n/de.json

@@ -356,10 +356,8 @@
     "settings.appearance.publicName": "Öffentlich",
     "settings.bounces.action": "Aktion",
     "settings.bounces.blocklist": "Sperrliste",
-    "settings.bounces.complaint": "Complaint",
     "settings.bounces.count": "Bounce Anzahl",
     "settings.bounces.countHelp": "Anzahl von Bounces pro Abonnent",
-    "settings.bounces.delete": "Löschen",
     "settings.bounces.enable": "Verarbeiten von Bounces aktivieren",
     "settings.bounces.enableMailbox": "Bounce-Postfach aktivieren",
     "settings.bounces.enablePostmark": "Postmark aktivieren",
@@ -369,17 +367,15 @@
     "settings.bounces.enabled": "Aktiviert",
     "settings.bounces.folder": "Ordner",
     "settings.bounces.folderHelp": "Name des zu scannenden IMAP-Ordners. z.B.: Inbox.",
-    "settings.bounces.hard": "Hard",
     "settings.bounces.invalidScanInterval": "Der Bounce Scan-Interval sollte mindestens 1 Minute betragen.",
     "settings.bounces.name": "Bounces",
     "settings.bounces.none": "Keine",
-    "settings.bounces.postmarkPassword": "Postmark Password",
-    "settings.bounces.postmarkUsername": "Postmark Username",
-    "settings.bounces.postmarkUsernameHelp": "Postmark allows you to enable basic authorization for webhooks. Make sure to enter the same credentials here and in your Postmark webhook settings.",
+    "settings.bounces.postmarkPassword": "Postmark Passwort",
+    "settings.bounces.postmarkUsername": "Postmark Benutzername",
+    "settings.bounces.postmarkUsernameHelp": "Postmark ermöglicht HTTP-Basic-Auth für Webhooks. Die Anmeldeinformationen müssen mit denen in den Postmark Webhook-Einstellungen übereinstimmen.",
     "settings.bounces.scanInterval": "Scan-Interval",
     "settings.bounces.scanIntervalHelp": "Interval mit dem das Bounce-Postfach gescannt werden soll (s for Sekunden, m für Minuten).",
     "settings.bounces.sendgridKey": "SendGrid Schlüssel",
-    "settings.bounces.soft": "Soft",
     "settings.bounces.type": "Typ",
     "settings.bounces.username": "Benutzername",
     "settings.confirmRestart": "Stelle sicher, dass laufende Kampagnen pausiert sind. Neustarten?",
@@ -413,8 +409,8 @@
     "settings.mailserver.authProtocol": "Autentifizierungsprotokoll",
     "settings.mailserver.host": "Server",
     "settings.mailserver.hostHelp": "SMTP Server Adresse.",
-    "settings.mailserver.idleTimeout": "Maximale Wartezeit",
-    "settings.mailserver.idleTimeoutHelp": "Wartezeit auf neue Aktivität bevor eine Verbindung geschlossen wird. (s für Sekunden, m für Minuten).",
+    "settings.mailserver.idleTimeout": "Maximale IDLE-Zeit",
+    "settings.mailserver.idleTimeoutHelp": "Wartezeit auf neue Aktivität bevor eine Verbindung geschlossen und aus dem Pool entfernt wird. (s für Sekunden, m für Minuten).",
     "settings.mailserver.maxConns": "Max. Verbindungen",
     "settings.mailserver.maxConnsHelp": "Maximale gleichzeitige Verbindungen zum SMTP Server",
     "settings.mailserver.password": "Passwort",
@@ -427,7 +423,7 @@
     "settings.mailserver.tlsHelp": "Verwende STARTTLS.",
     "settings.mailserver.username": "Benutzername",
     "settings.mailserver.waitTimeout": "Maximale Wartezeit",
-    "settings.mailserver.waitTimeoutHelp": "Wartezeit auf neue Aktivität bevor eine Verbindung geschlossen wird. (s für Sekunden, m für Minuten).",
+    "settings.mailserver.waitTimeoutHelp": "Wartezeit auf neue Aktivität bevor eine Verbindung geschlossen und aus dem Pool entfernt wird. (s für Sekunden, m für Minuten).",
     "settings.media.provider": "Anbieter",
     "settings.media.s3.bucket": "Bucket",
     "settings.media.s3.bucketPath": "Bucket Pfad",

Diff do ficheiro suprimidas por serem muito extensas
+ 175 - 47
keploy/test-set-0/mocks.yaml


Diff do ficheiro suprimidas por serem muito extensas
+ 2 - 1
keploy/test-set-0/tests/test-1.yaml


+ 43 - 0
keploy/test-set-0/tests/test-10.yaml

@@ -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' \

Diff do ficheiro suprimidas por serem muito extensas
+ 27 - 0
keploy/test-set-0/tests/test-11.yaml


+ 20 - 14
keploy/test-set-0/tests/test-2.yaml

@@ -7,10 +7,7 @@ spec:
         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"
+        url: http://localhost:9000/api/subscribers/1
         header:
             Accept: '*/*'
             Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
@@ -18,26 +15,35 @@ spec:
             User-Agent: curl/7.81.0
         body: ""
         body_type: ""
+        timestamp: 2023-11-03T03:04:07.055305186Z
     resp:
         status_code: 200
         header:
-            Content-Length: "772"
+            Content-Length: "706"
             Content-Type: application/json; charset=UTF-8
-            Date: Mon, 25 Sep 2023 10:53:45 GMT
+            Date: Fri, 03 Nov 2023 03:04:07 GMT
         body: |
-            {"data":{"results":[{"id":2,"created_at":"2023-09-20T10:36:36.370595Z","updated_at":"2023-09-20T10:36:36.370595Z","uuid":"86e36156-ff03-4cc9-8b27-fd391f7e77cc","name":"Opt-in list","type":"public","optin":"double","tags":["test"],"description":"","subscriber_count":1,"subscriber_statuses":{"unconfirmed":1},"subscription_created_at":null,"subscription_updated_at":null},{"id":1,"created_at":"2023-09-20T10:36:36.369954Z","updated_at":"2023-09-20T10:36:36.369954Z","uuid":"35ae6a52-a7df-44b3-a28c-a0bf86245fd9","name":"Default list","type":"private","optin":"single","tags":["test"],"description":"","subscriber_count":5,"subscriber_statuses":{"unconfirmed":5},"subscription_created_at":null,"subscription_updated_at":null}],"query":"","total":2,"per_page":100,"page":1}}
+            {"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.results.created_at
-            - body.data.results.tags
-            - body.data.results.type
-            - body.data.results.updated_at
-            - body.data.results.name
+            - body.data.created_at
+            - body.data.updated_at
             - header.Date
-            - body.data.results.optin
-    created: 1695639226
+            - 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: */*' \

+ 18 - 15
keploy/test-set-0/tests/test-3.yaml

@@ -11,34 +11,37 @@ spec:
         header:
             Accept: '*/*'
             Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
-            Content-Length: "170"
+            Content-Length: "169"
             Content-Type: application/json
             Host: localhost:9000
             User-Agent: curl/7.81.0
-        body: '{"email":"subsriber4@domain.com","name":"The Subscriber","status":"enabled","lists":[1],"attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}}}'
+        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: 200
+        status_code: 409
         header:
-            Content-Length: "739"
+            Content-Length: "37"
             Content-Type: application/json; charset=UTF-8
-            Date: Mon, 25 Sep 2023 10:54:14 GMT
+            Date: Fri, 03 Nov 2023 03:04:34 GMT
         body: |
-            {"data":{"id":18,"created_at":"2023-09-25T10:54:14.039652Z","updated_at":"2023-09-25T10:54:14.039652Z","uuid":"071136da-2de0-4c19-bec3-f4563ca50975","email":"subsriber4@domain.com","name":"The Subscriber","attribs":{"city":"Bengaluru","projects":3,"stack":{"languages":["go","python"]}},"status":"enabled","lists":[{"subscription_status":"unconfirmed","subscription_created_at":"2023-09-25T10:54:14.039652+00:00","subscription_updated_at":"2023-09-25T10:54:14.039652+00:00","subscription_meta":{},"id":1,"uuid":"35ae6a52-a7df-44b3-a28c-a0bf86245fd9","name":"Default list","type":"private","optin":"single","tags":["test"],"description":"","created_at":"2023-09-20T10:36:36.369954+00:00","updated_at":"2023-09-20T10:36:36.369954+00:00"}]}}
+            {"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:
-            - body.data.updated_at
-            - body.data.lists.subscription_updated_at
-            - body.data.lists.updated_at
-            - body.data.attribs.stack.languages
-            - body.data.lists.subscription_created_at
-            - body.data.lists.created_at
-            - body.data.id
-            - body.data.created_at
             - header.Date
-    created: 1695639254
+    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"]}}}'

Diff do ficheiro suprimidas por serem muito extensas
+ 11 - 19
keploy/test-set-0/tests/test-4.yaml


Diff do ficheiro suprimidas por serem muito extensas
+ 8 - 4
keploy/test-set-0/tests/test-5.yaml


+ 14 - 3
keploy/test-set-1/tests/test-4.yaml → keploy/test-set-0/tests/test-6.yaml

@@ -1,6 +1,6 @@
 version: api.keploy.io/v1beta2
 kind: Http
-name: test-4
+name: test-6
 spec:
     metadata: {}
     req:
@@ -17,20 +17,31 @@ spec:
             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: Mon, 25 Sep 2023 11:00:54 GMT
+            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: 1695639654
+    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"}'

+ 43 - 0
keploy/test-set-0/tests/test-7.yaml

@@ -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: */*' \

+ 50 - 0
keploy/test-set-0/tests/test-8.yaml

@@ -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' \

+ 39 - 0
keploy/test-set-0/tests/test-9.yaml

@@ -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'"

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 94
keploy/test-set-1/mocks.yaml


+ 0 - 34
keploy/test-set-1/tests/test-1.yaml

@@ -1,34 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-1
-spec:
-    metadata: {}
-    req:
-        method: POST
-        proto_major: 1
-        proto_minor: 1
-        url: http://localhost:9000/api/lists
-        header:
-            Accept: '*/*'
-            Authorization: Basic bGlzdG1vbms6bGlzdG1vbms=
-            Host: localhost:9000
-            User-Agent: curl/7.81.0
-        body: ""
-        body_type: ""
-    resp:
-        status_code: 400
-        header:
-            Content-Length: "27"
-            Content-Type: application/json; charset=UTF-8
-            Date: Mon, 25 Sep 2023 10:57:47 GMT
-        body: |
-            {"message":"Invalid name"}
-        body_type: ""
-        status_message: ""
-        proto_major: 0
-        proto_minor: 0
-    objects: []
-    assertions:
-        noise:
-            - header.Date
-    created: 1695639468

+ 0 - 40
keploy/test-set-1/tests/test-2.yaml

@@ -1,40 +0,0 @@
-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: ""
-    resp:
-        status_code: 200
-        header:
-            Content-Length: "699"
-            Content-Type: application/json; charset=UTF-8
-            Date: Mon, 25 Sep 2023 10:59:18 GMT
-        body: |
-            {"data":{"id":1,"created_at":"2023-09-20T10:36:36.37103Z","updated_at":"2023-09-20T10:36:36.37103Z","uuid":"61270bf1-d711-4473-9d74-6f8761f052b9","email":"john@example.com","name":"John Doe","attribs":{"city":"Bengaluru","good":true,"type":"known"},"status":"enabled","lists":[{"subscription_status":"unconfirmed","subscription_created_at":"2023-09-20T10:36:36.37103+00:00","subscription_updated_at":"2023-09-20T10:36:36.37103+00:00","subscription_meta":{},"id":1,"uuid":"35ae6a52-a7df-44b3-a28c-a0bf86245fd9","name":"Default list","type":"private","optin":"single","tags":["test"],"description":"","created_at":"2023-09-20T10:36:36.369954+00:00","updated_at":"2023-09-20T10:36:36.369954+00:00"}]}}
-        body_type: ""
-        status_message: ""
-        proto_major: 0
-        proto_minor: 0
-    objects: []
-    assertions:
-        noise:
-            - body.data.lists.subscription_updated_at
-            - body.data.created_at
-            - body.data.updated_at
-            - body.data.lists.subscription_created_at
-            - header.Date
-            - body.data.lists.created_at
-            - body.data.lists.updated_at
-    created: 1695639558

+ 0 - 35
keploy/test-set-1/tests/test-3.yaml

@@ -1,35 +0,0 @@
-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/public/subscription
-        header:
-            Accept: '*/*'
-            Content-Length: "151"
-            Content-Type: application/json
-            Host: localhost:9000
-            User-Agent: curl/7.81.0
-        body: '{"email":"subsriber@domain.com","name":"The Subscriber","list_uuids": ["eb420c55-4cfb-4972-92ba-c93c34ba475d", "0c554cfb-eb42-4972-92ba-c93c34ba475d"]}'
-        body_type: ""
-    resp:
-        status_code: 200
-        header:
-            Content-Length: "29"
-            Content-Type: application/json; charset=UTF-8
-            Date: Mon, 25 Sep 2023 10:59:55 GMT
-        body: |
-            {"data":{"has_optin":false}}
-        body_type: ""
-        status_message: ""
-        proto_major: 0
-        proto_minor: 0
-    objects: []
-    assertions:
-        noise:
-            - header.Date
-    created: 1695639595

+ 0 - 36
keploy/test-set-1/tests/test-5.yaml

@@ -1,36 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-5
-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": [1, 2, 3], "status": "confirmed"}'
-        body_type: ""
-    resp:
-        status_code: 400
-        header:
-            Content-Length: "28"
-            Content-Type: application/json; charset=UTF-8
-            Date: Mon, 25 Sep 2023 11:01:22 GMT
-        body: |
-            {"message":"No IDs given."}
-        body_type: ""
-        status_message: ""
-        proto_major: 0
-        proto_minor: 0
-    objects: []
-    assertions:
-        noise:
-            - header.Date
-    created: 1695639682

Diff do ficheiro suprimidas por serem muito extensas
+ 37 - 0
keploy/testReports/report-1.yaml


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff