• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pywbem / pywbem / 10662
92%

Build:
DEFAULT BRANCH: master
Ran 30 Oct 2019 05:29PM UTC
Jobs 1
Files 29
Run time 17s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
10662

push

travis-ci

andy-maier
Fixes #1890: Modify mof compiler and mocker to clean up CreateInstance (#1909)

* Fixes issue #1890 Modify mof compiler and mocker to clean up CreateInstance

Fix the mof_compiler to remove the logic in the createinstance function
to only attempt ModifyInstance if a CreateInstance fails with
ALLREADY_EXISTS and not attempt to DeleteInstance and CreateInstance.

Fix both the mof_compiler and the corresponding adaption of
MOFWBEMConnection in the mocker to correctly handle create instance from
compiler so that instances with the same path will modify instance with
the same path in the repository.

1. Removes the logic in compiler createinstance to delete the instance
in the repository and recreate it if the ModifyInstance fails and forces
an exception if the ModifyInstance fails

2. Adds test for Create duplicate instance in test_mof_compiler. This
test creates a new adaptation of MOFWBEMConnection
MOFWBEMConnectionInstDups that correctly handles the duplicate instance
creation by using the ModifyInstance which is part of this adaption

3. Duplicate this logic in the mocker _mocmofwbemconnection.py by adding
a corresponding ModifyInstance method.

4. Modify the test test_compile_instances_fail_dup in
test_wbemconnection_mock.py which originally tested for dups assuming
that a dup instance creation from the compiler was a failure from
earlier tests to confirm that the dup instance causes the original
instance to be modified.

5. Add to test for existing instance in mocker CreateInstance to
consider an instance from the compiler with either None for
CIMInstanceName or no keys as invalid.  This forces users of the pywbem
mocker to use the instance alias logic to set the instance path in
instances created in the mock repository.  This avoids the issue where
instances are created with a CIMInstanceName that consistes only of the
classname but no keybindings.

* Changes per Andy's comments

8824 of 10321 relevant lines covered (85.5%)

0.85 hits per line

Jobs
ID Job ID Ran Files Coverage
3 10662.3 (PACKAGE_LEVEL=latest) 30 Oct 2019 05:29PM UTC 0
85.5
Travis Job 10662.3
Source Files on build 10662
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #10662
  • 9f89e7c5 on github
  • Prev Build on master (#10657)
  • Next Build on master (#10733)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc