Build: Speed up integration tests (#43045) (#43169)

Changes so that postgres/mysql services in Drone maps their data volumes
to tmpfs volumes (memory) to improve performance.

(cherry picked from commit 5bec46ce23)
This commit is contained in:
Marcus Efraimsson
2021-12-15 18:20:00 +01:00
committed by GitHub
parent 20222bada0
commit e7680a0d65
6 changed files with 136 additions and 3 deletions
+15
View File
@@ -1,3 +1,9 @@
def integration_test_services_volumes():
return [
{ 'name': 'postgres', 'temp': { 'medium': 'memory' } },
{ 'name': 'mysql', 'temp': { 'medium': 'memory' }
}]
def integration_test_services(edition):
services = [
{
@@ -7,7 +13,12 @@ def integration_test_services(edition):
'POSTGRES_USER': 'grafanatest',
'POSTGRES_PASSWORD': 'grafanatest',
'POSTGRES_DB': 'grafanatest',
'PGDATA': '/var/lib/postgresql/data/pgdata',
},
'volumes': [{
'name': 'postgres',
'path': '/var/lib/postgresql/data/pgdata'
}],
},
{
'name': 'mysql',
@@ -18,6 +29,10 @@ def integration_test_services(edition):
'MYSQL_USER': 'grafana',
'MYSQL_PASSWORD': 'password',
},
'volumes': [{
'name': 'mysql',
'path': '/var/lib/mysql'
}]
},
]