Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plausible-analytics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
varac-projects
plausible-analytics
Commits
7d895143
Commit
7d895143
authored
4 years ago
by
Uku Taht
Browse files
Options
Downloads
Patches
Plain Diff
Add test configuration
parent
6c8ae24a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env.test
+5
-0
5 additions, 0 deletions
.env.test
config/runtime.exs
+1
-1
1 addition, 1 deletion
config/runtime.exs
config/test.exs
+6
-26
6 additions, 26 deletions
config/test.exs
mix.exs
+0
-6
0 additions, 6 deletions
mix.exs
with
12 additions
and
33 deletions
.env.test
0 → 100644
+
5
−
0
View file @
7d895143
DATABASE_URL
=
postgres
://
postgres
:
postgres
@
127.0.0.1
:
5432
/
plausible_test
CLICKHOUSE_DATABASE_URL
=
http
://
127.0.0.1
:
8123
/
plausible_test
CRON_ENABLED
=
false
LOG_LEVEL
=
warn
ENVIRONMENT
=
test
This diff is collapsed.
Click to expand it.
config/runtime.exs
+
1
−
1
View file @
7d895143
import
Config
if
config_env
()
==
:dev
do
if
config_env
()
in
[
:dev
,
:test
]
do
Envy
.
auto_load
()
end
...
...
This diff is collapsed.
Click to expand it.
config/test.exs
+
6
−
26
View file @
7d895143
...
...
@@ -2,39 +2,20 @@ import Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config
:plausible
,
PlausibleWeb
.
Endpoint
,
http:
[
port:
4002
],
server:
false
config
:plausible
,
PlausibleWeb
.
Endpoint
,
server:
false
# Print only warnings and errors during test
config
:logger
,
level:
:warn
# Reduce bcrypt rounds to speed up test suite
config
:bcrypt_elixir
,
:log_rounds
,
4
# Configure your database
config
:plausible
,
Plausible
.
Repo
,
url:
System
.
get_env
(
"DATABASE_URL"
,
"postgres://postgres:postgres@127.0.0.1:5432/plausible_test"
),
pool:
Ecto
.
Adapters
.
SQL
.
Sandbox
config
:plausible
,
Plausible
.
Repo
,
pool:
Ecto
.
Adapters
.
SQL
.
Sandbox
,
url:
"postgres://postgres:postgres@127.0.0.1:5432/plausible_test"
config
:plausible
,
Plausible
.
ClickhouseRepo
,
loggers:
[
Ecto
.
LogEntry
],
pool_size:
String
.
to_integer
(
System
.
get_env
(
"CLICKHOUSE_DATABASE_POOLSIZE"
,
"5"
)),
url:
System
.
get_env
(
"CLICKHOUSE_DATABASE_URL"
,
"http://127.0.0.1:8123/plausible_test"
)
pool_size:
5
config
:plausible
,
Plausible
.
Mailer
,
adapter:
Bamboo
.
TestAdapter
config
:plausible
,
Oban
,
crontab:
false
,
queues:
false
config
:plausible
,
paddle_api:
Plausible
.
PaddleApi
.
Mock
,
google_api:
Plausible
.
Google
.
Api
.
Mock
...
...
@@ -56,5 +37,4 @@ config :geolix,
]
config
:plausible
,
session_timeout:
0
,
environment:
System
.
get_env
(
"ENVIRONMENT"
,
"test"
)
session_timeout:
0
This diff is collapsed.
Click to expand it.
mix.exs
+
0
−
6
View file @
7d895143
...
...
@@ -106,12 +106,6 @@ defmodule Plausible.MixProject do
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to create, migrate and run the seeds file at once:
#
# $ mix ecto.setup
#
# See the documentation for `Mix` for more info on aliases.
defp
aliases
do
[
"ecto.setup"
:
[
"ecto.create"
,
"ecto.migrate"
,
"run priv/repo/seeds.exs"
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment