chore: initial import for test contour

This commit is contained in:
sova-bootstrap
2026-05-27 19:36:34 +03:00
commit 721afae5d5
19 changed files with 464 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
apiVersion: v2
name: sova-mocks
description: WireMock and Mailpit for test contour
type: application
version: 0.1.0
appVersion: "1.0.0"
@@ -0,0 +1,17 @@
{
"request": {
"method": "POST",
"urlPath": "/lead-service/v1/api/request/create"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"data": {
"leadId": "mock-lead-456"
}
}
}
}
@@ -0,0 +1,16 @@
{
"request": {
"method": "POST",
"urlPath": "/validate"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"status": "ok",
"message": ""
}
}
}
@@ -0,0 +1,19 @@
{
"request": {
"method": "POST",
"urlPath": "/api/reservation/anonymous-reserve"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"status": "ok",
"data": {
"reservationId": "mock-reservation-123",
"message": "Mock reservation created"
}
}
}
}
@@ -0,0 +1,21 @@
{
"request": {
"method": "GET",
"urlPath": "/filials/list"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"data": [
{
"id": 1,
"name": "Test Filial",
"address": "г. Саратов, ул. Тестовая, д. 1"
}
]
}
}
}
+31
View File
@@ -0,0 +1,31 @@
{
"request": {
"method": "GET",
"urlPath": "/api/reservation/intervals"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"data": [
{
"workdates": [
{
"2026-05-28": [
{
"depnum": 10,
"intervals": [
{ "isFree": true, "time": "10:00", "duration": 30 },
{ "isFree": false, "time": "10:30", "duration": 30 }
]
}
]
}
]
}
]
}
}
}
@@ -0,0 +1,22 @@
{
"request": {
"method": "GET",
"urlPath": "/pricelist/departments"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"data": [
{
"id": 10,
"name": "Test Department",
"viewInWeb": 1,
"schCount": 5
}
]
}
}
}
@@ -0,0 +1,31 @@
{
"request": {
"method": "GET",
"urlPath": "/pricelist/list"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"data": [
{
"kodoper": "1001",
"schname": "Test service",
"specname": "Test specialist",
"speccode": 101,
"priceInfo": 1500,
"discpercent": 0,
"discprice": 1500,
"structname": "Test dept",
"fname": "Test Filial",
"filial": 1,
"comment": "",
"mediaId": null
}
],
"total": 1
}
}
}
+105
View File
@@ -0,0 +1,105 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: wiremock-mappings
namespace: {{ .Values.namespace }}
data:
{{- range $path, $_ := .Files.Glob "mappings/*.json" }}
{{ base $path }}: |
{{ $.Files.Get $path | indent 4 }}
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mis-mock
namespace: {{ .Values.namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: mis-mock
template:
metadata:
labels:
app: mis-mock
spec:
containers:
- name: wiremock
image: {{ .Values.wiremock.image }}
args: ["--global-response-templating"]
ports:
- containerPort: {{ .Values.wiremock.port }}
volumeMounts:
- name: mappings
mountPath: /home/wiremock/mappings
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
volumes:
- name: mappings
configMap:
name: wiremock-mappings
---
apiVersion: v1
kind: Service
metadata:
name: mis-mock
namespace: {{ .Values.namespace }}
spec:
selector:
app: mis-mock
ports:
- port: {{ .Values.wiremock.port }}
targetPort: {{ .Values.wiremock.port }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mailpit
namespace: {{ .Values.namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: mailpit
template:
metadata:
labels:
app: mailpit
spec:
containers:
- name: mailpit
image: {{ .Values.mailpit.image }}
ports:
- containerPort: {{ .Values.mailpit.smtpPort }}
name: smtp
- containerPort: {{ .Values.mailpit.uiPort }}
name: ui
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: mailpit
namespace: {{ .Values.namespace }}
spec:
selector:
app: mailpit
ports:
- name: smtp
port: {{ .Values.mailpit.smtpPort }}
targetPort: smtp
- name: ui
port: {{ .Values.mailpit.uiPort }}
targetPort: ui
+10
View File
@@ -0,0 +1,10 @@
namespace: sova-mocks
wiremock:
image: wiremock/wiremock:3.9.1
port: 8080
mailpit:
image: axllent/mailpit:v1.21
smtpPort: 1025
uiPort: 8025