You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by rodgersh <hu...@lmco.com> on 2014/10/09 22:58:32 UTC

Deletion of cfg files

Hello -

I am configuring metatypes in my Karaf instance via Groovy scripts in
soapUI. I programmatically write a .cfg file to the /etc directory and my
metatype is successfully configured. But when I want to teardown the test
setup and do this by deleting the .cfg file, it does restore the default
values of the metatype but they are not saved. 

For example, if there was a checkbox in the metatype and the .cfg file I
write to /etc checked this box - that works. But when I delete the .cfg
file, if I bring up the metatype the checkbox is unchecked, but the
functionality associated with that checkbox is still executed as though it
is still checked. I have to hit Save for the new (default) configuration to
take. Since my tests are automated that is not feasible.

Is this expected behavior? I did a workaround by creating a new .cfg file
with the default metatype values in it in my teardown script, but deleting
the file would be much simpler.

(BTW, I am using .cfg files to do some of this configuration because
non-String data cannot be updated programmatically - see KARAF-1560, and I
cannot currently upgrade my Karaf version to 3.0 or 2.3.6)

Thanks -

Hugh



--
View this message in context: http://karaf.922171.n3.nabble.com/Deletion-of-cfg-files-tp4035761.html
Sent from the Karaf - User mailing list archive at Nabble.com.