Closed Bug 676626 Opened 13 years ago Closed 13 years ago

server-full tests fail when nodes isn't installed

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rmiller, Unassigned)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Running the tests with a fresh checkout of server-full gives the following failure:

======================================================================
ERROR: Failure: ImportError (No module named nodes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rob/tmp/server-full/lib/python2.6/site-packages/nose-1.1.2-py2.6.egg/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/Users/rob/tmp/server-full/lib/python2.6/site-packages/nose-1.1.2-py2.6.egg/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/Users/rob/tmp/server-full/lib/python2.6/site-packages/nose-1.1.2-py2.6.egg/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/Users/rob/tmp/server-full/deps/server-sreg/syncsreg/tests/test_user.py", line 52, in <module>
    from nodes import NodeAttributionError
ImportError: No module named nodes

According to telliott, the nodes library shouldn't be required, and these tests should just be skipped in environments that don't have nodes installed.
The plan is to get rid of syncsreg in server-full, and yeah -- skip those tests in synreg if any
Depends on: 675891
ah hum, it's a duplicate in fact
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Reopening this, since it's not really a dupe (though the problems are related).

Having a node setup isn't a requirement of sreg, so the tests should reflect that by skipping. Ironically, all this stuff is coming out of reg and sreg shortly anyway, but in the interim, we should be correct about it.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment on attachment 550862 [details] [diff] [review]
uses node test skip to skip nodes if there's no node lib defined

LGTM besides:

s/except Exception/except (KeyError, ImportError)/

(discussed on IRC)
Attachment #550862 - Flags: review?(tarek) → review+
Toby has pushed this here : https://hg.mozilla.org/services/server-sreg/rev/4eedc7954cbc
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Whiteboard: [qa-]
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: