Search in sources :

Example 1 with OSClient

use of org.openstack4j.api.OSClient in project openstack4j by ContainX.

the class KeystoneTokenlessTest method pass_headers_Test.

/**
     * check headers whether right from request
     *
     * @throws Exception
     */
public void pass_headers_Test() throws Exception {
    respondWith(JSON_USERS);
    OSClient.OSClientV3 osClient = OSFactory.builderV3().endpoint(authURL("/v3")).scopeToDomain(Identifier.byId(DOMAIN_ID)).authenticate();
    osClient.identity().users().list();
    RecordedRequest request = server.takeRequest();
    assertEquals(request.getHeader(ClientConstants.HEADER_X_DOMAIN_ID), DOMAIN_ID);
}
Also used : RecordedRequest(okhttp3.mockwebserver.RecordedRequest) OSClient(org.openstack4j.api.OSClient)

Aggregations

RecordedRequest (okhttp3.mockwebserver.RecordedRequest)1 OSClient (org.openstack4j.api.OSClient)1