diff options
author | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2010-02-17 16:27:19 +0000 |
---|---|---|
committer | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2010-02-17 16:27:19 +0000 |
commit | 494f1de1db6c29a3f5f6d0e5cabc29b86eaf99e8 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/tests/testBasic.py | |
parent | 006e26f2a226bd4f934dcd98c598cc5830c0b285 (diff) | |
download | sos-494f1de1db6c29a3f5f6d0e5cabc29b86eaf99e8.tar.gz |
-blah
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@777 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src/tests/testBasic.py')
-rw-r--r-- | src/tests/testBasic.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/tests/testBasic.py b/src/tests/testBasic.py deleted file mode 100644 index 8338091d..00000000 --- a/src/tests/testBasic.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -from glob import glob -from subprocess import Popen, PIPE -from commons import * -from nose import with_setup - -def setup_func(): - for report in glob("/tmp/sosreport*"): - os.remove(report) - -def teardown_func(): - for report in glob("/tmp/sosreport*"): - os.remove(report) - -def testSosreportBin(): - """ test existence of sosreport bin """ - if not os.path.isfile(commons['bin']): - raise AssertionError("Sosreport executable does not exist") - -# mostly sanity checks on plugins -@with_setup(setup_func, teardown_func) -def testUnattended(): - """ test batch mode """ - (out, err) = Popen([commons['bin'],'-ofilesys','--batch'], - stdout=PIPE,stderr=PIPE).communicate() - output = out - if not len(glob('/tmp/sosreport-*.bz2')): - raise AssertionError("No sosreport created.") - -@with_setup(setup_func, teardown_func) -def testUnattendedNameTicket(): - """ test for --name/--ticket within sosreport file """ - (out, err) = Popen([commons['bin'],'-ofilesys','--name=%s' % (commons['testName'],), - '--ticket-number=%d' % (commons['testID'],),'--batch'],stdout=PIPE, - stderr=PIPE).communicate() - if not len(glob('/tmp/sosreport-%s.%d-*bz2' % (commons['testName'],commons['testID']))): - raise AssertionError("Can not determine sosreport") - -# plugin specific tests |