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

test: Allow specifying an running machine with certain tests #3848

Conversation

stefwalter
Copy link
Contributor

This allows specifying an already running machine with certain
test/verify/check- tests.

Pass a --machine=10.1.1.5 argument when running the tests. Obviously
the machine needs to be configured as the tests expect. And the test
cannot expect multiple machines.

@stefwalter
Copy link
Contributor Author

This needs some work:

Traceback (most recent call last):
  File "/build/cockpit/test/testlib.py", line 945, in run
    test(result)
  File "/usr/lib64/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/usr/lib64/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 433, in __call__
    return self.run(*args, **kwds)
  File "/build/cockpit/test/testlib.py", line 482, in run
    super(MachineCase, self).run(intercept)
  File "/usr/lib64/python2.7/unittest/case.py", line 366, in run
    result.addError(self, sys.exc_info())
  File "/build/cockpit/test/testlib.py", line 415, in addError
    func(test, self._exc_info_to_string(err, test))
  File "/build/cockpit/test/testlib.py", line 474, in intercept
    self.copy_journal("FAIL")
  File "/build/cockpit/test/testlib.py", line 630, in copy_journal
    for m in self.machines:
AttributeError: 'TestKerberos' object has no attribute 'machines'

if machine_class:
raise unittest.SkipTest("Cannot run this test when specific machine address is specified")
if len(self.machines) != 0:
raise unittest.SkipTest("Cannot run multiple machines a specific machine address is specified")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest:
"Cannot run multiple machines if a specific machine address is specified"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

This allows specifying an already running machine with certain
test/verify/check- tests.

Pass a --machine=10.1.1.5 argument when running the tests. Obviously
the machine needs to be configured as the tests expect. And the test
cannot expect multiple machines.

Closes cockpit-project#3848
@dperpeet dperpeet closed this in aca91e8 Mar 2, 2016
@stefwalter stefwalter deleted the check-test-specify-machine branch March 3, 2016 09:18
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

Successfully merging this pull request may close these issues.

2 participants