Re: DrillRestServer Tests
Hey Kunal, I tried rest-assured out for my rest api unit tests and It works. I'll include it as part of my PR for DRILL-5723. Thanks, Tim From: Timothy Farkas Sent: Friday, August 25, 2017 2:46:53 PM To: dev@drill.apache.org Subject: Re: DrillRestServer Tests 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 <kkha...@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:prog...@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 <par...@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 <tfar...@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 >> >>
Re: DrillRestServer Tests
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 <kkha...@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:prog...@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 <par...@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 <tfar...@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 >> >>
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:prog...@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 <par...@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 <tfar...@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 >> >>
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 Chandrawrote: > > 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 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 >> >>
Re: DrillRestServer Tests
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 Farkaswrote: > 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 > >