Remove test-ga.ini, use env instead
This commit is contained in:
parent
2cb3ab3d81
commit
95e82c222b
|
@ -36,6 +36,12 @@ jobs:
|
|||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
redis:
|
||||
image: redis:3
|
||||
env:
|
||||
CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test
|
||||
CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test
|
||||
CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test
|
||||
CKAN_SOLR_URL: http://solr:8983/solr/ckan
|
||||
CKAN_REDIS_URL: redis://redis:6379/1
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -47,12 +53,12 @@ jobs:
|
|||
- name: Setup extension (CKAN >= 2.9)
|
||||
if: ${{ matrix.ckan-version != '2.7' && matrix.ckan-version != '2.8' }}
|
||||
run: |
|
||||
ckan -c test-ga.ini db init
|
||||
ckan -c test-ga.ini harvester initdb
|
||||
ckan -c test.ini db init
|
||||
ckan -c test.ini harvester initdb
|
||||
- name: Setup extension (CKAN < 2.9)
|
||||
if: ${{ matrix.ckan-version == '2.7' || matrix.ckan-version == '2.8' }}
|
||||
run: |
|
||||
paster --plugin=ckan db init -c test-ga.ini
|
||||
paster --plugin=ckanext-harvest harvester initdb -c test-ga.ini
|
||||
paster --plugin=ckan db init -c test.ini
|
||||
paster --plugin=ckanext-harvest harvester initdb -c test.ini
|
||||
- name: Run tests
|
||||
run: pytest --ckan-ini=test-ga.ini --cov=ckanext.harvest --disable-warnings ckanext/harvest/tests
|
||||
run: pytest --ckan-ini=test.ini --cov=ckanext.harvest --disable-warnings ckanext/harvest/tests
|
||||
|
|
77
test-ga.ini
77
test-ga.ini
|
@ -1,77 +0,0 @@
|
|||
[DEFAULT]
|
||||
debug = false
|
||||
# Uncomment and replace with the address which should receive any error reports
|
||||
#email_to = you@yourdomain.com
|
||||
smtp_server = localhost
|
||||
error_email_from = paste@localhost
|
||||
|
||||
[server:main]
|
||||
use = egg:Paste#http
|
||||
host = 0.0.0.0
|
||||
port = 5000
|
||||
|
||||
|
||||
[app:main]
|
||||
use = config:/srv/app/src/ckan/test-core.ini
|
||||
|
||||
ckan.datastore.write_url = postgresql://datastore_write:pass@postgres/datastore_test
|
||||
ckan.datastore.read_url = postgresql://datastore_read:pass@postgres/datastore_test
|
||||
sqlalchemy.url = postgresql://ckan_default:pass@postgres/ckan_test
|
||||
solr_url = http://solr:8983/solr/ckan
|
||||
ckan.redis.url = redis://redis:6379/1
|
||||
|
||||
# Here we hard-code the database and a flag to make default tests
|
||||
# run fast.
|
||||
ckan.plugins = harvest ckan_harvester test_harvester test_harvester2 test_action_harvester
|
||||
ckan.harvest.mq.type = redis
|
||||
ckan.legacy_templates = false
|
||||
# NB: other test configuration should go in test-core.ini, which is
|
||||
# what the postgres tests use.
|
||||
|
||||
|
||||
# Logging configuration
|
||||
[loggers]
|
||||
keys = root, ckan, sqlalchemy
|
||||
|
||||
[handlers]
|
||||
keys = console, dblog
|
||||
|
||||
[formatters]
|
||||
keys = generic, dblog
|
||||
|
||||
[logger_root]
|
||||
level = WARN
|
||||
handlers = console
|
||||
|
||||
[logger_ckan]
|
||||
qualname = ckan
|
||||
handlers =
|
||||
level = INFO
|
||||
|
||||
[logger_ckan_harvester]
|
||||
qualname = ckanext.harvest
|
||||
handlers = dblog
|
||||
level = DEBUG
|
||||
|
||||
[logger_sqlalchemy]
|
||||
handlers =
|
||||
qualname = sqlalchemy.engine
|
||||
level = WARN
|
||||
|
||||
[handler_console]
|
||||
class = StreamHandler
|
||||
args = (sys.stdout,)
|
||||
level = NOTSET
|
||||
formatter = generic
|
||||
|
||||
[handler_dblog]
|
||||
class = ckanext.harvest.log.DBLogHandler
|
||||
args = ()
|
||||
level = DEBUG
|
||||
formatter = dblog
|
||||
|
||||
[formatter_dblog]
|
||||
format = %(message)s
|
||||
|
||||
[formatter_generic]
|
||||
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
|
Loading…
Reference in New Issue