summaryrefslogtreecommitdiffstats
path: root/src/software
Commit message (Collapse)AuthorAgeFilesLines
* Uninstall 'unicode-chars' package in test_enum_instance_names test.Jan Safranek2014-04-181-0/+1
| | | | | | The package is installed by TestSoftwareIdentityChecks.test_package_file_checks_unicode and can make the test fail.
* Don't use epoch for 'rpm -q' or '-e'.Jan Safranek2014-04-181-15/+25
| | | | Older rpm doesn't support it.
* Don't require the openlmi-software package installed.Jan Safranek2014-04-181-1/+0
| | | | We want to run tests also from git checkout.
* Use unittest2 on Python 2.6Jan Safranek2014-04-1815-22/+18
|
* User 'yum repolist -v' instead of 'yum repoinfo'.Jan Safranek2014-04-181-3/+3
| | | | | yum repoinfo is available only in newer yum. Surprisingly, they habe the same output.
* Use proper paths for various tools.Jan Safranek2014-04-184-8/+8
|
* Port tests to Python 2.6Jan Safranek2014-04-188-41/+51
| | | | | | | - replace various dictionary/set comprehensions - re-implement subprocess.check_output() - use optparse
* Update job_request decorator for Python 2.6Jan Safranek2014-04-171-2/+4
| | | | | There is no inspect.callargs there, so we must assume that 'async' is in kwargs.
* Update job_handler decorator for Python 2.6Jan Safranek2014-04-171-8/+16
| | | | | | There is no inspect.callargs there. As a simple workaround, 'job' must be the first parameter in decorated method.
* Fixed loading of logging config.Jan Safranek2014-04-171-1/+1
| | | | | - use correct config file path - read correct config file item
* python 2.6 compatibility. fix conversion of string into character set error.Ales Ledvinka2014-04-155-29/+29
|
* python2.6 review one omissionAles Ledvinka2014-04-141-3/+3
|
* python2.6 syntax conversion, review comments for set performanceAles Ledvinka2014-04-144-8/+8
|
* python2.6 support, review comment performance of set([])Ales Ledvinka2014-04-149-53/+53
|
* python2.6 software providerAles Ledvinka2014-04-117-19/+19
|
* software: added tests for non-ascii charactersMichal Minar2014-01-243-46/+180
| | | | Test that unicode characters work at least for package files.
* Updated copyright yearsPeter Schiffer2014-01-1670-71/+71
| | | | Updated copyright years to include new year 2014.
* software: SoftwareIdentityFileCheck test fixesMichal Minar2014-01-091-0/+3
| | | | | Under some environments umask may be set to 0077 which caused unexpected results in tests. File mode checks did not pass.
* tests: ensure the use of exceptions is well definedMichal Minar2014-01-081-0/+1
| | | | | | | | | | | | | | | Some tests expect that exceptions won't be thrown out of LMIShell's functions. Others prefers them and enable them globally. This causes problems when running under nosetests all provider tests at once. Tests that modified enablement of exception throws globally caused others to fail. This patch makes sure that each TestCase has defined use of exceptions. Default state is to have them disabled. If a TestCase prefers having them enabled, just one variable needs to be overriden in its body: class AccountBase(lmibase.LmiTestCase): USE_EXCEPTIONS = True
* software: fixed possible deadlock in session managerMichal Minar2014-01-061-10/+20
| | | | | | * peak() method used to lock wrong mutex, which could cause a deadlock. * pop_reply() method could block if non-blocking access had been requested.
* software: test improvementsMichal Minar2014-01-069-24/+45
| | | | | | | | | | * Suppress warnings when removing testing packages that may have been modified by finished test. Whe some installed file were missing, rpm produced ugly warnings and errors. * Set LC_ALL=C when running yum and parsing its output. Otherwise numbers get localized, which confuses the parser. * Allow to run tests from another directory. * Minor cleanups and docstrings corrections.
* software: fixed tests behaviour under nosetestsMichal Minar2013-12-191-13/+13
| | | | | | | | | | | | Test cases under nosetests did not behave well. The part of class setup method was not called due to faulty checking of test case instantiation. It caused not-testing repositories to be enabled during running all but first test. This patch ensures that all not-testing repositories are disabled during subsequents test runs. If anyhing is missing upon intialization, testing database is recreated.
* software: test fixesMichal Minar2013-12-192-2/+9
| | | | | | | | | | * Restore repository, after the test run, only if it was previously enabled. * yum-config-manager, which is used to get information about reporitories, shortens lines on its output when too long. Therefor repository name can not be checked for exact match against data in LMI_SoftwareIdentityResource if it is too long.
* software: added test for SoftwareInstallationServiceMichal Minar2013-12-191-0/+20
| | | | | It checks, that error description is retrievable when the asynchronous job fails to execute.
* software: test fixes and improvementsMichal Minar2013-12-173-11/+11
| | | | | | | | Fixed package installation tests that did not ensure that particular package is uninstalled before test begins. Speeded up test set up phase for TestSoftwareIdentityFileChecks and TestSoftwareIdentityChecks.
* software: fixed creation of Error instanceMichal Minar2013-12-177-17/+19
| | | | | | | Environment needs to be propagated to factory function of CIMError when error occurs while handling asynchronous job. Resolves: rhbz#1043243
* software: fix tests for rhel7Michal Minar2013-12-171-3/+28
| | | | | Packages with empty source tarballs failed to build on rhel7. Added empty readmes to previously empty packages to fix it.
* software: make the checksum type retrieval more robustMichal Minar2013-12-172-5/+67
| | | | | | | | | | | In some rare cases, digest algorithm is not set in rpm packages (happens on rhel7). Try to deduce it from hash digest stored for installed files and fallback to some sane default. In case it's not set, package use md5 digest algorithm for its files. Provider failed to generate it correctly. The Checksum was doubled. Resolves: rhbz#1032590
* software: bugfix in property checking of identity file checksMichal Minar2013-12-171-1/+1
| | | | | | | | get_target_operating_system returns a tuple which can not be equal to integer. Due to this error, GetInstance() call failed on on LMI_SoftwareIdentityFileCheck objects on rhel7. Resolves: rhbz#1032590
* software: added missing module related to job handlingMichal Minar2013-12-151-0/+343
| | | | | | This should belong in commit 2b22e29 that reworked job handling. Resolves: rhbz#1039018
* software: fixed tests for rhel7Michal Minar2013-12-131-1/+2
| | | | | $RPM_BUILD_DIR is not created before %install phase on rhel7. It needs to be done explicitly.
* software: added tests for software installation serviceMichal Minar2013-12-121-1/+171
| | | | Test installation, removal and updating of rpm packages.
* software: improved association testMichal Minar2013-12-121-5/+23
| | | | | Assert that InstallDate is filled properly for available packages that are installed.
* software: test improvementsMichal Minar2013-12-127-78/+156
| | | | | Speeded up test initialization and cleanup. Use as few calls to subprocesses as possible.
* software: added another QA testsMichal Minar2013-12-123-0/+401
| | | | | | This is a collective work of Jan Grec and Michal Minar. Added tests for LMI_SoftwareInstallationService. Added tests for software provider as a whole.
* software: redone job handlingMichal Minar2013-12-125-526/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a serious flaw in previous object model. JobManager was a thread spawned from inside of separated YumWorker process. Meanwhile IndicationManager was spawned in provider process which is correct otherwise it coult not send indications through broker. The problem is that JobManager needs to create indications and access IndicationManager. But they were in different processes. JobManager worked with static data duplicated from provider process when the worker process has been forked. Therefor all subscriptions and indication enablement made after the worker processed has been created did not affect jobmanager. For some unknown reasons this could also cause a segfault to worker process when creating indications that were sent to provider process. This patch shuffles classes a bit: * JobManager is spawned as a thread in provider process by YumDB. * JObManager spawns its own SessionManager that is a wrapper for YumWorker process * SessionManager is a thread running in provider's process. It manages worker process and ensures that yum database is locked when there is an active session. * YumWorker does not spawn any other process. It processes jobs one by one. Resolves: #1039018
* software: correctly recognize installed from availableMichal Minar2013-12-123-11/+38
| | | | | | | | | When available packages were searched, they were all treated as not installed. Yum uses two different classes to represent installed and available packages and the same package may instantiated from both of them. Resolves: #1039025
* Software: Tests reorganization and fixes.Robin Hack2013-12-103-1/+145
|
* software: minor test enhancementsMichal Minar2013-12-026-8/+27
| | | | | | | | | | | Added one test to SoftwareIdentityFileCheck.Invoke() method testing correct error code. Renamed testing package pkg1 to pkg2 in misc repository to match its comment. Rendering function CIMInstanceNames should behave nicely for objects of another type and return their text representation.
* software: raise proper error when repository not foundMichal Minar2013-12-021-17/+20
| | | | | | | | CIM_ERR_NOT_FOUND shall be raised when objectpath of invoked method does not refer to existing repository. CIM_ERR_FAILED was raised instead which is unhelpful. Resolves: rhbz#1036291
* software: another fix to associator generationMichal Minar2013-11-301-3/+4
| | | | | | | | This fix repairs previous patch trying to speed up generating of software identities associated with software collection through LMI_MemberOfSoftwareCollection. Resolves: rhbz#1035328
* software: fixed InstanceID of installation serviceMichal Minar2013-11-291-1/+1
| | | | | | LMI_SoftwareInstallationService passed incorrect value in InstanceID property. Value should contain the whole class name, not shortened version.
* software: added test for installation service associationMichal Minar2013-11-291-0/+350
| | | | | This patch adds test modul for LMI_InstallationServiceAffectsElement association class.
* software: fixed service associators generatorMichal Minar2013-11-291-2/+10
| | | | | | | | | | | LMI_SoftwareInstallationServiceAffectsElement association class generated just the newest available packages. With this patch, all available packages are generated. When generating associators of installation service ComputerSystem instance was omitted. This patch adds it to generated items. Resolves: rhbz#1034698
* software: rewritten testsMichal Minar2013-11-2919-1740/+3404
| | | | | | Software tests now create custom testing repositories and packages. This makes them more robust and efficient (nothing needs to be downloaded).
* software: fixed and speeded up another associator callMichal Minar2013-11-271-2/+57
| | | | | | | | | | Associators generator of LMI_MemberOfSoftwareCollection is broken. It adds Collection property to genereted instance names of LMI_SoftwareIdentity. Moreover its very slow if instances are requested. This patch removes superfluous key property and adds optimizations reducing its execution time to seconds. Resolves: rhbz#1035328
* software: fixed and speeded up associator callMichal Minar2013-11-271-2/+56
| | | | | | | | | | Associators generator of LMI_SoftwareIdentityServiceAffectsElement is broken. It generates only CIM_ComputerSystem, not any LMI_SoftwareIdentity instance. And if it did, it would be too slow (tens of minutes). This patch allows software identities to be generated and adds optimizations reducing its execution time to seconds. Resolves: rhbz#1034698
* software: fixed enumeration of service affected elementsMichal Minar2013-11-261-3/+2
| | | | | | | Enumeration of LMI_SoftwareInstallationServiceAffectsElement did not work. Provider would hang indefinitely. Resolves: rhbz#1034615
* software: fixed verification of device filesMichal Minar2013-11-202-3/+8
| | | | | Rpm database stores raw device number that needs to be compared with st_rdev attribute of stat object, not the st_dev one.
* software: fixed handling of invalid requestMichal Minar2013-11-201-1/+1
| | | | | | | | Due to a failure in handling request for instance of LMI_SoftwareIdentityFileCheck representing non-existent file, a CIM_ERR_FAILED was delivered to client instead of CIM_ERR_NOT_FOUND. Resolves: rhbz#1032502