elixir-oslo-devops / jaspar-playbook

Repo for issues related to Jaspar
0 stars 0 forks source link

Test the test instance of JASPAR #7

Open sveinugu opened 2 years ago

sveinugu commented 2 years ago
morj-uio commented 2 years ago

There are two scripts in the tests folder which are documented in jaspar2020/docs/Testing.rst:

[cloud-user@test jaspar2020]$ tests/test_website.py --url https://test.jaspar.uiocloud.no
...F....
======================================================================
FAIL: test_example_alignment (__main__.FormsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_website.py", line 499, in test_example_alignment
    self._test_add_to_and_inspect_cart(session, response)
  File "tests/test_website.py", line 624, in _test_add_to_and_inspect_cart
    self._test_cart_items(session, matrix_ids, response)
  File "tests/test_website.py", line 650, in _test_cart_items
    self.assertEqual(cart_matrix_ids, matrix_ids, "%s expected in cart: %s" % (matrix_ids, cart_matrix_ids))
AssertionError: Items in the second set but not the first:
'MA0005.1'
'MA0021.1'
'MA0001.1'
'MA0020.1'
'MA0008.1' : {'MA0021.1', 'MA0001.1', 'MA0005.1', 'MA0020.1', 'MA0008.1'} expected in cart: set()

----------------------------------------------------------------------
Ran 8 tests in 10.668s

FAILED (failures=1)

[cloud-user@test jaspar2020]$ tests/test_api.py --url https://test.jaspar.uiocloud.no/api/v1
.............
----------------------------------------------------------------------
Ran 13 tests in 2.586s

OK

Seems to be a problem with the cart not receiving or storing items, which I see also when testing on the website. Note that there should be a cookie named "sessionid", which is missing on the testsite. But why?

Yes, the file "secret.txt" must also be labeled httpd_sys_content_t, otherwise the (django) session handling is not initialized and apache must be restarted to initialize the initialization.

Likewise the folder "profile-inference" must be httpd_sys_content_t for that tool to show up on the site.

Now it seems to work. But more manual testing may be done on the site.

[cloud-user@test jaspar2020]$ tests/test_website.py --url https://test.jaspar.uiocloud.no
........
----------------------------------------------------------------------
Ran 8 tests in 22.282s

OK
jCHENEBY-zz commented 2 years ago

I have tested the website. I noticed a couple of issues specific to the test instance. I have attached a small repport.https://app.zenhub.com/files/488884841/2b780ee5-6e99-4d37-8ec3-e747125a8699/download

sveinugu commented 2 years ago

Great job, @jCHENEBY!

@morj-uio and myself will have to prioritize proto2 before my presentation (July 17.), so I believe @morj-uio might not have time to look at this also before summer. But I suppose sending an email to Anthony with a link to the test instance and with the test report attached would also be a nice update!

morj-uio commented 2 years ago

I have been looking at the test report now. The problems with the clustering and randomize tools were caused by SELinux blocking access to some data files in the "jaspar_tools" folder. That folder is cloned from another bitbucket repo by the deploy script (00-user-deploy-tools.sh) . Getting proper results now, as far as I can tell. @jCHENEBY, can you try the tools again?