Testing the bookstore modules in ConductR
In the previous section, we created a new book entity as part of our testing to get the inventory-management
module up and running. Our ultimate goal of testing things is to create a new SalesOrder
, and having a book in the system with inventory on it is one of the preconditions to creating that SalesOrder
. As the book does not yet have an inventory on it, we will need to add one before we can use that book in a SalesOrder
. The command to add inventory to that book is as follows:
http PUT boot2docker:9000/inventory-management/api/book/<book_id>/inventory/10
If you didn't save the book ID from earlier, then just run the lookup by tag query, shown in the previous section, to get the full Book JSON back, and grab the ID from there. Running this command will add the necessary inventory to the book so that we can create SalesOrders
against it.
The other requirement to create a SalesOrder
is to have a BookstoreUser
in the system. You may already...