Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run e2e tests with keploy #142

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
51 changes: 17 additions & 34 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# https://docs.docker.com/compose/environment-variables/

version: "2.4"

services:
Expand All @@ -16,57 +14,42 @@ services:
volumes:
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
environment:
# timezone inside container
- TZ

# necessary Postgres options/variables
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
networks:
- keploy-network

mattermost:
ports:
- 8065:8065
container_name: docker-mattermost-1
depends_on:
- postgres
image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG}
image: mattermost
restart: ${RESTART_POLICY}
security_opt:
- no-new-privileges:true
pids_limit: 200
read_only: ${MATTERMOST_CONTAINER_READONLY}
tmpfs:
- /tmp
volumes:
- ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw
- ${MATTERMOST_DATA_PATH}:/mattermost/data:rw
- ${MATTERMOST_LOGS_PATH}:/mattermost/logs:rw
- ${MATTERMOST_PLUGINS_PATH}:/mattermost/plugins:rw
- ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client/plugins:rw
- ${MATTERMOST_BLEVE_INDEXES_PATH}:/mattermost/bleve-indexes:rw
# When you want to use SSO with GitLab, you have to add the cert pki chain of GitLab inside Alpine
# to avoid Token request failed: certificate signed by unknown authority
# (link: https://github.com/mattermost/mattermost-server/issues/13059 and https://github.com/mattermost/docker/issues/34)
# - ${GITLAB_PKI_CHAIN_PATH}:/etc/ssl/certs/pki_chain.pem:ro
- ./volumes/app/mattermost/config:/mattermost/config:rw
- ./volumes/app/mattermost/data:/mattermost/data:rw
- ./volumes/app/mattermost/logs:/mattermost/logs:rw
- ./volumes/app/mattermost/plugins:/mattermost/plugins:rw
- ./volumes/app/mattermost/client/plugins:/mattermost/client/plugins:rw
- ./volumes/app/mattermost/bleve-indexes:/mattermost/bleve-indexes:rw
environment:
# timezone inside container
- TZ

# necessary Mattermost options/variables (see env.example)
- MM_SQLSETTINGS_DRIVERNAME
- MM_SQLSETTINGS_DATASOURCE

# necessary for bleve
- MM_BLEVESETTINGS_INDEXDIR

# additional settings
- MM_SERVICESETTINGS_SITEURL
networks:
- keploy-network

# If you use rolling image tags and feel lucky watchtower can automatically pull new images and
# instantiate containers from it. https://containrrr.dev/watchtower/
# Please keep in mind watchtower will have access on the docker socket. This can be a security risk.
#
# watchtower:
# container_name: watchtower
# image: containrrr/watchtower:latest
# restart: unless-stopped
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
networks:
keploy-network:
external: true
92 changes: 92 additions & 0 deletions keploy-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
record:
path: ""
# mandatory
command: ""
proxyport: 0
containerName: ""
networkName: ""
delay: 5
buildDelay: 30s
tests:
filters:
- path: "api/v4/users/me/teams"
urlMethods: []
headers: {}
host: "localhost"
stubs:
filters:
- path: ""
host: ""
ports: 0
test:
path: ""
# mandatory
command: ""
proxyport: 0
containerName: ""
networkName: ""
# example: "test-set-1": ["test-1", "test-2", "test-3"]
selectedTests:
# to use globalNoise, please follow the guide at the end of this file.
globalNoise:
global:
body: {last_viewed_at_times: [], request_id: [], last_activity_at: [], Forbidden: []}
header: {X-Request-Id: [], request_id: [], ETag: []}
delay: 5
buildDelay: 30s
apiTimeout: 5
ignoreOrdering: false
stubs:
filters:
- path: ""
host: ""
ports: 0
withCoverage: false
generateTestReport: true
coverageReportPath: ""

# Example on using tests
#tests:
# filters:
# - path: "/user/app"
# urlMethods: ["GET"]
# headers: {
# "^asdf*": "^test"
# }
# host: "dc.services.visualstudio.com"
#Example on using stubs
#stubs:
# filters:
# - path: "/user/app"
# port: 8080
# - port: 8081
# - host: "dc.services.visualstudio.com"
# - port: 8081
# host: "dc.services.visualstudio.com"
# path: "/user/app"
#
#Example on using globalNoise
#globalNoise:
# global:
# body: {
# # to ignore some values for a field,
# # pass regex patterns to the corresponding array value
# "url": ["https?://\S+", "http://\S+"],
# }
# header: {
# # to ignore the entire field, pass an empty array
# "Date": [],
# }
# # to ignore fields or the corresponding values for a specific test-set,
# # pass the test-set-name as a key to the "test-sets" object and
# # populate the corresponding "body" and "header" objects
# test-sets:
# test-set-1:
# body: {
# # ignore all the values for the "url" field
# "url": []
# }
# header: {
# # we can also pass the exact value to ignore for a field
# "User-Agent": ["PostmanRuntime/7.34.0"]
# }
Loading