drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Farkas <tfar...@mapr.com>
Subject Re: DrillRestServer Tests
Date Fri, 25 Aug 2017 21:46:53 GMT
I got something that does more or less what I want. It is easy to start a drill bit with the
web server in tests now with the existing Fixture infrastructure.

FixtureBuilder builder = ClusterFixture.builder().
  configProperty(ExecConstants.HTTP_ENABLE, true)

ClusterFixture cluster = builder.build()


Then I added a RestClientFixture which has the methods I wanted to fetch system options

from the rest api.


RestClientFixture restClientFixture = cluster.restClientFixture()

restClientFixture.getStatusOption(MOCK_PROPERTY)


Underneath the hood I'm using the jersey client in the RestClientFixture to talk to the Webserver
rest api,

but it seems like rest-assured is a much more wholistic solution than jersey. I'll investigate
for a couple

hours to see if I can replace the jersey client with rest-assured. Thanks for letting me know
about the tool Kunal!


Thanks,

Tim


________________________________
From: Kunal Khatua <kkhatua@mapr.com>
Sent: Friday, August 25, 2017 10:45:58 AM
To: dev@drill.apache.org
Subject: RE: DrillRestServer Tests

Krystal pointed out to an existing tool that allows testing for REST APIs.
https://github.com/rest-assured/rest-assured

Unfortunately, we're currently running short of hands in getting a good robust prototype for
this.

Is anyone interested in volunteering?

-----Original Message-----
From: Paul Rogers [mailto:progers@mapr.com]
Sent: Friday, August 25, 2017 10:01 AM
To: dev@drill.apache.org
Subject: Re: DrillRestServer Tests

To simplify code reviews in this area, should we add tests? Might be mighty hard to “mentally
execute” in lieu of tests…

- Paul

> On Aug 25, 2017, at 9:40 AM, Parth Chandra <parthc@apache.org> wrote:
>
> Don't think there are any unit tests, and again there is no rest api
> client. The UI is the only test tool, sadly.
>
>
> On Thu, Aug 24, 2017 at 12:55 PM, Timothy Farkas <tfarkas@mapr.com> wrote:
>
>> Hi All,
>>
>> I want to add some unit tests for a new rest endpoint I added to the
>> DrillRestServer. I've been looking but I couldn't find an existing
>> test for rest endpoints, or a rest api client. Does anyone have any
>> pointers to where the rest api tests are kept and if there is a
>> pre-existing rest api client?
>>
>> Thanks,
>> Tim
>>
>>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message