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

CKAN 2.6.0 tests fail #3372

Closed
rwillmer opened this issue Dec 19, 2016 · 19 comments
Closed

CKAN 2.6.0 tests fail #3372

rwillmer opened this issue Dec 19, 2016 · 19 comments

Comments

@rwillmer
Copy link

CKAN Version if known (or site URL)

2.6.0

Please describe the expected behaviour

I run the nosetests.
The tests all work.

Please describe the actual behaviour

Several tests fail. I will add the failure messages in a comment.
This is the command I use:

./../bin/nosetests --ckan --reset-db --with-pylons=test-core.ini ckan

What steps can be taken to reproduce the issue?

I can repeat it by rerunning the tests.

@rwillmer
Copy link
Author

rwillmer commented Dec 19, 2016

<../bin/nosetests --ckan --reset-db --with-pylons=test-core.ini ckan         
........................../usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:79: SAWarning: Usage of the 'related attribute set' operation is not currently supported within the execution stage of the flush process. Results may not be consistent.  Consider using alternative event listeners or connection-level operations instead.
  sess._flush_warning("related attribute set")
...................................................................F............................F......................................................................................................................................................................................................................................................S.S.S.S...........................................................................................................................................................................................................................................................................SS......F.FS..............................F.FS..............................F.F...............................................................................................................................................................................................................................................S...........S..........................F......................S..............S.................................................................................................................................................................................................................................................................................................You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
F...........................................................................EF.........................................................................E.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..............................
======================================================================
ERROR: ckan.tests.lib.test_cli.TestUserAdd.test_cli_user_add_unicode_fullname_system_exit
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/lib/test_cli.py", line 70, in test_cli_user_add_unicode_fullname_system_exit
    self.user_cmd.add()
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 829, in add
    data_dict['fullname'] = data_dict['fullname'].decode(sys.getfilesystemencoding())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
-------------------- >> begin captured logging << --------------------
ckan.model: INFO: Database table data deleted
ckan.model: INFO: Database initialised
ckan.model: INFO: Database rebuilt
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: ckan.tests.lib.test_io.TestDecodeEncodePath.test_decode_encode_path
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/lib/test_io.py", line 34, in test_decode_encode_path
    with io.open(ckan_io.encode_path(path), u'w',
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/io.py", line 33, in encode_path
    return p.encode(_FILESYSTEM_ENCODING)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-17: ordinal not in range(128)

======================================================================
FAIL: ckan.tests.controllers.test_group.TestGroupInnerSearch.test_group_search_within_org_results
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/controllers/test_group.py", line 617, in test_group_search_within_org_results
    assert_true('1 dataset found for &#34;One&#34;' in search_response)
AssertionError: False is not true
-------------------- >> begin captured logging << --------------------
ckan.model: INFO: Database table data deleted
ckan.model: INFO: Database initialised
ckan.model: INFO: Database rebuilt
ckan.lib.maintain: WARNING: Use `c.search_facets` instead.
ckan.lib.base: INFO:  /group/7bb4d870-4639-4d00-b83f-7894a42aaace render time 0.132 seconds
ckan.lib.maintain: WARNING: Use `c.search_facets` instead.
ckan.lib.base: INFO:  /group/7bb4d870-4639-4d00-b83f-7894a42aaace render time 0.111 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.controllers.test_organization.TestOrganizationInnerSearch.test_organization_search_within_org_results
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/controllers/test_organization.py", line 403, in test_organization_search_within_org_results
    assert_true('1 dataset found for &#34;One&#34;' in search_response)
AssertionError: False is not true
-------------------- >> begin captured logging << --------------------
ckan.model: INFO: Database table data deleted
ckan.model: INFO: Database initialised
ckan.model: INFO: Database rebuilt
ckan.lib.maintain: WARNING: Use `c.search_facets` instead.
ckan.lib.base: INFO:  /organization/25d7ae8f-ba60-4415-8a5f-a5c63cb79513 render time 0.132 seconds
ckan.lib.maintain: WARNING: Use `c.search_facets` instead.
ckan.lib.base: INFO:  /organization/25d7ae8f-ba60-4415-8a5f-a5c63cb79513 render time 0.147 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.legacy.functional.api.test_package_search.TestPackageSearchApi1.test_05_uri_json_tags
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 112, in test_05_uri_json_tags
    self.assert_results(res_dict, [u'annakarenina'])
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 44, in assert_results
    assert_equal(set(res_dict['results']), set(expected_pkgs))
AssertionError: Items in the second set but not the first:
u'annakarenina'
-------------------- >> begin captured logging << --------------------
ckan.lib.base: INFO:  /api/1/search/dataset render time 0.018 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.legacy.functional.api.test_package_search.TestPackageSearchApi1.test_06_uri_q_tags
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 129, in test_06_uri_q_tags
    self.assert_results(res_dict, [u'annakarenina'])
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 44, in assert_results
    assert_equal(set(res_dict['results']), set(expected_pkgs))
AssertionError: Items in the second set but not the first:
u'annakarenina'
-------------------- >> begin captured logging << --------------------
ckan.lib.base: INFO:  /api/1/search/dataset render time 0.024 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.legacy.functional.api.test_package_search.TestPackageSearchApi2.test_05_uri_json_tags
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 112, in test_05_uri_json_tags
    self.assert_results(res_dict, [u'annakarenina'])
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 44, in assert_results
    assert_equal(set(res_dict['results']), set(expected_pkgs))
AssertionError: Items in the second set but not the first:
u'00e2ee37-a128-4aa7-b493-568f45f961eb'
-------------------- >> begin captured logging << --------------------
ckan.lib.base: INFO:  /api/2/search/dataset render time 0.014 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.legacy.functional.api.test_package_search.TestPackageSearchApi2.test_06_uri_q_tags
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 129, in test_06_uri_q_tags
    self.assert_results(res_dict, [u'annakarenina'])
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 44, in assert_results
    assert_equal(set(res_dict['results']), set(expected_pkgs))
AssertionError: Items in the second set but not the first:
u'00e2ee37-a128-4aa7-b493-568f45f961eb'
-------------------- >> begin captured logging << --------------------
ckan.lib.base: INFO:  /api/2/search/dataset render time 0.014 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.legacy.functional.api.test_package_search.TestPackageSearchApi3.test_05_uri_json_tags
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 112, in test_05_uri_json_tags
    self.assert_results(res_dict, [u'annakarenina'])
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 44, in assert_results
    assert_equal(set(res_dict['results']), set(expected_pkgs))
AssertionError: Items in the second set but not the first:
u'annakarenina'
-------------------- >> begin captured logging << --------------------
ckan.lib.base: INFO:  /api/3/search/dataset render time 0.027 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.legacy.functional.api.test_package_search.TestPackageSearchApi3.test_06_uri_q_tags
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 129, in test_06_uri_q_tags
    self.assert_results(res_dict, [u'annakarenina'])
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 44, in assert_results
    assert_equal(set(res_dict['results']), set(expected_pkgs))
AssertionError: Items in the second set but not the first:
u'annakarenina'
-------------------- >> begin captured logging << --------------------
ckan.lib.base: INFO:  /api/3/search/dataset render time 0.026 seconds
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.legacy.lib.test_solr_search_index.TestSolrSearch.test_1_basic
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/lib/test_solr_search_index.py", line 54, in test_1_basic
    assert len(results) == 2
AssertionError

======================================================================
FAIL: ckan.tests.legacy.test_versions.TestVersions.test_pylons
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/test_versions.py", line 14, in test_pylons
    assert pylons_version == "Pylons==0.9.7"
AssertionError

======================================================================
FAIL: ckan.tests.lib.test_cli.TestUserAdd.test_cli_user_add_unicode_fullname_unicode_decode_error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/lib/test_cli.py", line 59, in test_cli_user_add_unicode_fullname_unicode_decode_error
    assert False, "UnicodeDecodeError exception shouldn't be raised"
AssertionError: UnicodeDecodeError exception shouldn't be raised
-------------------- >> begin captured logging << --------------------
ckan.model: INFO: Database table data deleted
ckan.model: INFO: Database initialised
ckan.model: INFO: Database rebuilt
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: ckan.tests.test_coding_standards.test_building_the_docs
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/test_coding_standards.py", line 79, in test_building_the_docs
    code=err.returncode))
AssertionError: Building the docs failed with return code: 1

----------------------------------------------------------------------
Ran 2036 tests in 1658.168s

FAILED (SKIP=12, errors=2, failures=12)
Exception TypeError: TypeError('getattr(): attribute name must be string',) in <bound method Solr.__del__ of <pysolr.Solr object at 0x7f182b75d610>> ignored
root@9247f3b76dea:/usr/lib/ckan/default/src/ckan# 

@rwillmer
Copy link
Author

Is 2.6.0 running under test at CircleCI? If so, is there a URL for the test output?

@wardi
Copy link
Contributor

wardi commented Dec 19, 2016

@rwillmer it is, here are the latest tests along the 2.6 branch https://circleci.com/gh/ckan/ckan/tree/dev-v2.6 You can see the release here: https://circleci.com/gh/ckan/ckan/1953

@wardi
Copy link
Contributor

wardi commented Dec 19, 2016

@rwillmer do you have the right versions of all the python dependencies installed?

in particular I noticed this error:

assert pylons_version == "Pylons==0.9.7"
AssertionError

@TkTech
Copy link
Member

TkTech commented Dec 19, 2016

@rwillmer Wrap your blocks in triple-tildes to format it correctly, I've gone ahead and edited your comment :)

@rwillmer
Copy link
Author

thanks. I believe I've built against the 2.6.0 branch; I'll debug my version against the CircleCI version.

@rwillmer
Copy link
Author

Interesting about the pylons version comment; I'm using the requirements file for the dependencies so this should be correct. I'll figure out where that's getting updated.

@torfsen
Copy link
Contributor

torfsen commented Dec 20, 2016

If I understand your original post correctly then it seems that you are running nosetests via its path in the virtualenv (e.g. path/to/your/venv/bin/nosetests ...) instead of from within an actually activated virtualenv. That doesn't work. Compare

$ /usr/lib/ckan/default/bin/nosetests --ckan --with-pylons=test-core.ini ckan/tests/legacy/test_versions.py
F
======================================================================
FAIL: ckan.tests.legacy.test_versions.TestVersions.test_pylons
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/ckan/ckan/tests/legacy/test_versions.py", line 14, in test_pylons
    assert pylons_version == "Pylons==0.9.7"
AssertionError: 
-------------------- >> begin captured logging << --------------------
[removed]
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 1 test in 0.222s

FAILED (failures=1)

with

$ . /usr/lib/ckan/default/bin/activate
(default) $ nosetests --ckan --with-pylons=test-core.ini ckan/tests/legacy/test_versions.py
.
----------------------------------------------------------------------
Ran 1 test in 0.440s

OK

@rwillmer
Copy link
Author

The virtualenv documentation states that you don't need to use activate. From https://virtualenv.pypa.io/en/stable/userguide/#usage,

This is all it does; it’s purely a convenience. If you directly run a script or the python interpreter from the virtualenv’s bin/ directory (e.g. path/to/ENV/bin/pip or /path/to/ENV/bin/python-script.py) there’s no need for activation.

@rwillmer
Copy link
Author

I think the problems I'm having are to do with software versions and locales. (that failing pylons version test was a red herring)

I'm rather hampered by the fact that the process you're running on CircleCI doesn't match the 2.6.0 documentation.

For example, if you follow the documentation for installing from source and then testing, on ubuntu:trusty, you'd be using Postgres 9.3, and the standard packaged Solr-Jetty. Whereas from looking at the output from the successful run on CircleCI, then we're using an unknown version of Postgres and the very old Solr 4.3.1 (from June 2013) and running it directly.

I'm definitely having an install problem with taking a standard trusty install, it's using the POSIX locale by default. Which means that the createdb commands fail, until I delete the automatically installed pgcluster, and recreate using a UTF locale.

And quite a few of the errors I'm seeing are Unicode and pattern matching related, AFAICS.

My questions about the CircleCI install are:
a) what version of Postgres is it using?
b) what locale is the VM using?
c) is there a single command anywhere which constructs a test environment from scratch and then runs the tests?

If that doesn't exist in the 2.6.0 release, does it exist in any more recent dev version?

Thanks for any pointers; I'm trying to write an automatic build/test/install process, so may be able to contribute some useful scripts if I can get this to work.

@torfsen
Copy link
Contributor

torfsen commented Dec 20, 2016

@rwillmer You don't need to activate the virtualenv if you want to execute a single command. That's why your execution of nosetests itself works. However, without activating the virtualenv you don't get its environment variables. If the command you're executing relies on these then you will get different behavior compared to callling the command with an activated virtualenv. That's why the two examples I posted show different results.

Regarding your locale problems, CKAN's installation docs tell you to make sure that your PostgreSQL instance is configured to use UTF-8:

Check that the encoding of databases is UTF8, if not internationalisation may be a problem. Since changing the encoding of PostgreSQL may mean deleting existing databases, it is suggested that this is fixed before continuing with the CKAN install.

@rwillmer
Copy link
Author

rwillmer commented Dec 21, 2016

Thanks, @torfsen. That's news to me that those two forms wouldn't always produce identical results! I'd always assumed that the wording on the virtualenv site meant the two forms could be used interchangeably; I learn something every day.

Ok, so I've built it all again from scratch using activate everywhere. Now using the solr config from the CircleCI setup. Now it's down to 3 errors, but it is still failing. I'll post the errors in a following comment, but they are unicode/locale related.

I have some questions:

1/ It would be useful to know what version of postgres is used, and what locale is used.

2/ In the CircleCI setup, you are calling ./bin/solr_init/create_core.sh, which doesn't appear in the installation/testing documentation. Is that something that needs to be called in a standard install? Or is there some other part of the procedure which replicates what that does?

3/ The ckan.ini that is generated by paster make_config has several plugins:

ckan.plugins = stats text_view image_view recline_view

(to which I add "datastore") whereas the test_core.ini only has "stats". Does that mean that the other plugins aren't being tested? Should my test_core.ini include all the plugins I use in production?

@rwillmer
Copy link
Author

$ nosetests --ckan --reset-db --with-pylons=test-core.ini --nologcapture ckan

======================================================================
ERROR: ckan.tests.lib.test_cli.TestUserAdd.test_cli_user_add_unicode_fullname_system_exit
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/lib/test_cli.py", line 70, in test_cli_user_add_unicode_fullname_system_exit
    self.user_cmd.add()
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 829, in add
    data_dict['fullname'] = data_dict['fullname'].decode(sys.getfilesystemencoding())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)

======================================================================
ERROR: ckan.tests.lib.test_io.TestDecodeEncodePath.test_decode_encode_path
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/lib/test_io.py", line 34, in test_decode_encode_path
    with io.open(ckan_io.encode_path(path), u'w',
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/io.py", line 33, in encode_path
    return p.encode(_FILESYSTEM_ENCODING)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-17: ordinal not in range(128)

======================================================================
FAIL: ckan.tests.lib.test_cli.TestUserAdd.test_cli_user_add_unicode_fullname_unicode_decode_error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/lib/test_cli.py", line 59, in test_cli_user_add_unicode_fullname_unicode_decode_error
    assert False, "UnicodeDecodeError exception shouldn't be raised"
AssertionError: UnicodeDecodeError exception shouldn't be raised

----------------------------------------------------------------------
Ran 2036 tests in 1711.765s

FAILED (SKIP=12, errors=2, failures=1)
Exception TypeError: TypeError('getattr(): attribute name must be string',) in <bound method Solr.__del__ of <pysolr.Solr object at 0x7f09771e8410>> ignored
(default)ubuntu@058cd73e98a0:/usr/lib/ckan/default/src/ckan$ 

@rwillmer
Copy link
Author

It's a locale problem, as I thought. The docker ubuntu image I'm using has a default charmap of 7-bit ANSI, which doesn't play nicely with 8-bit Norwegian text (as used in the failing test)

$ locale charmap
ANSI_X3.4-1968

This is the problem, so let's fix it

$ export LANG=en_US.utf8

So now we have

$ locale charmap
UTF-8

And all is well. Just re-rerunning the test-suite to verify, then I'll close this.
(I'd still like the answers to 2 and 3 above though, if anyone can shed any light...)

@LondonAppDev
Copy link
Contributor

I am getting some of the same failures that @rwillmer was getting. For example:

======================================================================
FAIL: ckan.tests.legacy.functional.api.test_package_search.TestPackageSearchApi3.test_06_uri_q_tags
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 129, in test_06_uri_q_tags
    self.assert_results(res_dict, [u'annakarenina'])
  File "/usr/lib/ckan/default/src/ckan/ckan/tests/legacy/functional/api/test_package_search.py", line 44, in assert_results
    assert_equal(set(res_dict['results']), set(expected_pkgs))
AssertionError: Items in the second set but not the first:
u'annakarenina'
-------------------- >> begin captured logging << --------------------
ckan.lib.base: INFO:  /api/3/search/dataset render time 0.006 seconds
--------------------- >> end captured logging << ---------------------

I am also using Docker to run the tests.

I believe I have solved the encoding issues and I think the remaining problems are related to solr.

@rwillmer when you say Now using the solr config from the CircleCI setup. would you mind pointing me to the place you got the solr config from? I've copied the schema from the GitHub repo for tag 2.6.2 (which I am running) but it's hasn't fixed the errors.

@rwillmer
Copy link
Author

The CKAN documentation doesn't match what they are using on CircleCI.

I followed the CircleCI link on http://github.com/ckan/ckan and found myself here. https://circleci.com/gh/ckan/ckan

So then I found a working test and looked to see how it was setup.

@LondonAppDev
Copy link
Contributor

Thanks a lot for the quick reply @rwillmer.

Looks like they are running this script:
https://github.com/ckan/ckan/blob/master/bin/solr_init/create_core.sh

Is this what you mean when you say the CircleCI build doesn't match the docs?

@rwillmer
Copy link
Author

The docs at http://docs.ckan.org/en/latest/maintaining/installing/install-from-package.html talk through installing via apt-get from a package and then modifying config files.

The CircleCI build gets a solr tarball, and runs it directly as a service without troubling apt-get.

Two totally different methods of setting up Solr.

@LondonAppDev
Copy link
Contributor

Ah I see what you mean. Thank you @rwillmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants