Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1158: mofcomp rollback of test.mof with mof_compiler fails
Fixes issue in mof_compiler where the remove option fails to remove mof created by an earlier compile of the same file. This was primarily an issue of getting the instance paths correct on the CreateInstance. Adds a test for rollbacik to test_mofcompiler.py based on using the mocker and test.mof Adds a second manual test against a server at http://localhost that executes mof_compiler to create and rollback multiple times in two namespaces. Adds documentation on the rollback limitations to the rollback method documentation.
- Loading branch information
1 parent
ab4430f
commit 4ae4547
Showing
4 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Test mof_compiler creation and removal of a collection of MOF in | ||
# a single file | ||
# This is a very limited simplistic test. It simply runs the script | ||
# mof_compiler twice, once to build the test mof into defined server and | ||
# a second time to remove it. The only validation is that the scripts | ||
# run without error. | ||
# Further, it assumes that the WBEMServer is running, uses http, and is | ||
# at localhost.. It does this twice to confirm that everything was removed | ||
# on the first remove. | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
echo DIR = $DIR | ||
PYWBEM_ROOT_DIR=$DIR/../../ | ||
|
||
MOF_FILE=$PYWBEM_ROOT_DIR/tests/unittest/pywbem/test.mof | ||
SCHEMA=$PYWBEM_ROOT_DIR/tests/schema/mofFinal2.51.0/ | ||
SERVER_URL=http://localhost | ||
# To get verbose output, set VERBOSE=-v | ||
VERBOSE="" | ||
NAMESPACE=root/SampleProvider | ||
|
||
mof_compiler -s $SERVER_URL $VERBOSE -I $SCHEMA $MOF_FILE | ||
mof_compiler -s $SERVER_URL $VERBOSE -r -I $SCHEMA $MOF_FILE | ||
mof_compiler -s $SERVER_URL $VERBOSE -I $SCHEMA $MOF_FILE | ||
mof_compiler -s $SERVER_URL $VERBOSE -r -I $SCHEMA $MOF_FILE | ||
|
||
mof_compiler -s $SERVER_URL $VERBOSE -I $SCHEMA $MOF_FILE -n $NAMESPACE | ||
mof_compiler -s $SERVER_URL $VERBOSE -r -I $SCHEMA $MOF_FILE -n $NAMESPACE | ||
mof_compiler -s $SERVER_URL $VERBOSE -I $SCHEMA $MOF_FILE -n $NAMESPACE | ||
mof_compiler -s $SERVER_URL $VERBOSE -r -I $SCHEMA $MOF_FILE -n $NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters