Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-359

Modify jclouds-chef unit tests to use mockwebserver

    XMLWordPrintableJSON

Details

    • Test
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.7.1
    • None
    • jclouds-chef

    Description

      From nacx in one of the pull requests

      I'll merge this PR, but after some discussions in the mailing list, we are improving the way we implement unit tests. We are switching to use [mockwebserver](http://code.google.com/p/mockwebserver/) instead of our custom mock (generated by the `requestSendsResponse` methods). The main difference when using mockwebserver is that the request is actually sent over the backing http connection, so the tests are more complete and give us more confidence that our apis work as expected.

      It would be great to use that in upcoming pull requests. There are still no tests in jclouds-chef that use it, but if you are willing to start with a test base class we can reuse (and perhaps start changing some existing ExpectTest to the new MockTest), you can take a look at the MockTests classes in the [openstack-swift](https://github.com/jclouds/jclouds-labs-openstack/tree/master/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features) api to see an example of how they work (they are pretty similar to our Expect tests, though).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              noorul Noorul Islam K M
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: