candlepin/candlepin — pull request #618 by dgoodwin (2014-06-25 18:05:17+00:00)
Title: 1110843: Lookup correct upstream cert from source stack.

Sub-pools originating from a stack have no subscription ID because they
technically could be from multiple subscriptions, causing Candlepin to return
no upstream certificate when thumbslug requested one to proxy a guests
entitlement.

When thumbslug fetches the upstream cert for an entitlement from a stack
derived sub-pool, we'll return the eldest entitlement in the host's stack that
is currently active.

Replace barren entitlement resource test with some actual tests for this
functionality.

Spec test author: William Poteat

Conflicts:
src/main/java/org/candlepin/resource/EntitlementResource.java
src/test/java/org/candlepin/resource/test/EntitlementResourceTest.java