Thank you so much joerg.herzinger
I have not tested your last suggested code but yesterday I found a solution of this. “updating an attribute on one node and then searching that attribute from other node” was not working with test kitchen. when I tested same code in chef server it worked like a charm.
What I concluded yesterday that feature is not supported in Chef Zero and it is only supported in Chef Server.
Now i have one more question. I have read the complete documentation regarding search we can only search node, environment and few more things but I could not find how to search value of an attribute. i have able to search a node where dmgr_ready = true (search result is a node) but i need to find a way to get values of this parameter (search result should be ‘true’ or ‘false’ i.e the value of the attribute)
Thanks again for your great and quick support and help