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

instructions unclear on running robottelo #743

Open
thomasmckay opened this issue Jun 15, 2018 · 5 comments
Open

instructions unclear on running robottelo #743

thomasmckay opened this issue Jun 15, 2018 · 5 comments

Comments

@thomasmckay
Copy link
Contributor

I have no idea from the docs how to run robottelo. I'd like instructions to include:

  • sample boxes section (variables, etc.)
  • description of available variables
  • details on how this is meant to run (is it a separate vm or meant to run on existing server?)
  • how to work with a devel environment
  • how to work with the robottelo tests themselves (ie. how do i add/mod a test and re-run?)
@akofink
Copy link
Contributor

akofink commented Jun 18, 2018

I agree the documentation/examples needs to be improved. For the record, though, here's how I've got it working.

A playbook I put in user_playbooks (I think we should go ahead and add this as a playbook to forklift):

---
- hosts: all
  become: true
  roles:
    - robottelo

In boxes, use a box you already have up (possibly add this to the example local boxes file?):

centos7-katello-3.7:
  box: centos7
  ansible:
    playbook: 'user_playbooks/robottelo.yml'

And run vagrant provision centos7-katello-3.7. An alternative is to copy the playbook in question and add the robottelo role to the end; however, that's not really as feasible with the generated release boxes.

All the possible options are found in forklift/roles/robottelo/defaults/main.yml like every other Ansible role, though this requires some prior knowledge of Ansible. I don't know the answer to your last point. :)

@akofink
Copy link
Contributor

akofink commented Jun 18, 2018

And, this fails with the following (Full log):

TASK [robottelo : Run tests] ***************************************************
Monday 18 June 2018  08:12:47 -0400 (0:00:00.458)       0:03:47.086 ***********
fatal: [centos7-katello-3.7]: FAILED! => {
    "changed": true,
    "cmd": [
        "/root/robottelo/venv/bin/py.test",
        "--junit-xml=results.xml",
        "-m",
        "not stubbed",
        "tests/foreman/endtoend/test_api_endtoend.py"
    ],
    "delta": "0:00:02.736914",
    "end": "2018-06-18 12:12:47.631643",
    "rc": 4,
    "start": "2018-06-18 12:12:44.894729"
}

STDERR:

Traceback (most recent call last):
  File "/root/robottelo/venv/lib/python2.7/site-packages/_pytest/config.py", line 392, in _importconftest
    mod = conftestpath.pyimport()
  File "/root/robottelo/venv/lib/python2.7/site-packages/py/_path/local.py", line 668, in pyimport
    __import__(modname)
  File "/root/robottelo/venv/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 216, in load_module
    py.builtin.exec_(co, mod.__dict__)
  File "/root/robottelo/venv/lib/python2.7/site-packages/py/_builtin.py", line 221, in exec_
    exec2(obj, globals, locals)
  File "<string>", line 7, in exec2
  File "/root/robottelo/tests/foreman/conftest.py", line 9, in <module>
    from robottelo.cleanup import EntitiesCleaner
  File "/root/robottelo/robottelo/cleanup.py", line 6, in <module>
    from robottelo.cli.base import CLIReturnCodeError
  File "/root/robottelo/robottelo/cli/base.py", line 6, in <module>
    from robottelo import ssh
  File "/root/robottelo/robottelo/ssh.py", line 13, in <module>
    from robottelo.config import settings
  File "/root/robottelo/robottelo/config/__init__.py", line 1, in <module>
    from robottelo.config.base import Settings
  File "/root/robottelo/robottelo/config/base.py", line 18, in <module>
    import airgun.settings
  File "/root/robottelo/venv/lib/python2.7/site-packages/airgun/__init__.py", line 1, in <module>
    from airgun.settings import Settings
  File "/root/robottelo/venv/lib/python2.7/site-packages/airgun/settings.py", line 4, in <module>
    from configparser import ConfigParser
ImportError: No module named configparser
ERROR: could not load /root/robottelo/tests/foreman/conftest.py

@ekohl
Copy link
Member

ekohl commented Jun 18, 2018

Looks like airgun is assuming python 3.

@ekohl
Copy link
Member

ekohl commented Jun 18, 2018

Looks like they broke it intentionally: SatelliteQE/airgun#96

@ekohl
Copy link
Member

ekohl commented Jun 19, 2018

It turns out robottelo master dropped Python 2 support and now requires Python 3. We'll need to pull in a Python 3 SCL and run using that.

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

3 participants