You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Minder (JIRA)" <ji...@apache.org> on 2013/11/26 23:32:35 UTC
[jira] [Created] (KNOX-210) Create functional test template
Kevin Minder created KNOX-210:
---------------------------------
Summary: Create functional test template
Key: KNOX-210
URL: https://issues.apache.org/jira/browse/KNOX-210
Project: Apache Knox
Issue Type: Test
Components: Server
Affects Versions: 0.3.0
Reporter: Kevin Minder
Fix For: 0.4.0
--
This message was sent by Atlassian JIRA
(v6.1#6144)
Re: Functional test template
Posted by Kevin Minder <ke...@hortonworks.com>.
Hi Everyone,
As part of my last change I've created a new functional test suite that
I'm intending to be used only for "local" services.
gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
By local services I mean test or mock services that are embedded in the
Knox gateway process as opposed dispatching the request over the network.
So this leaves us with one suite to cover all of the "remote" (mocked)
services (e.g. WebHDFS, WebHCat, Oozie, HBase, etc.).
GatewayBasicFuncTest.java
Note: That I will be renaming this suite to something like
GatewaySystemFuncTest.java because it certainly isn't "Basic" anymore.
The other suite will cover anything that doesn't require these external
mocked services.
GatewayLocalFuncTest.java
As I said in my previous email. Lets try to hold to these two suites
(plus the sample/template).
Thanks.
Kevin.
On 11/26/13 6:25 PM, Kevin Minder wrote:
> Hi Everyone,
> I added a "sample" functional test since I know this can be hard to
> get your head around.
> https://issues.apache.org/jira/browse/KNOX-210
>
> These are the files that make up the sample and a brief description of
> what they are for.
>
> gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
>
> This is the test itself. It start ldap and gateway servers with a
> specific topology and users, etc.
>
> gateway-test/src/test/resources/org/apache/hadoop/gateway/GatewaySampleFuncTest/users.ldif
>
> These are the users loaded into the LDAP server.
>
> gateway-test/src/test/java/org/apache/hadoop/gateway/TestProviderDeploymentContributor.java
>
> gateway-test/src/test/java/org/apache/hadoop/gateway/TestServiceDeploymentContributor.java
>
> gateway-test/src/test/java/org/apache/hadoop/gateway/TestServiceDispatchFilter.java
>
> gateway-test/src/test/resources/META-INF/services/org.apache.hadoop.gateway.deploy.ProviderDeploymentContributor
>
> gateway-test/src/test/resources/META-INF/services/org.apache.hadoop.gateway.deploy.ServiceDeploymentContributor
>
> These are a "mock" provider/service. Basically it ends up deploying
> the TestServiceDispatchFilter where there would normally be a regular
> dispatch filter. This TestServiceDispatchFilter simply returns the
> value "test-service-response" in response to all requests.
>
> Please don't modify this an leave it as a sample moving forward.
>
> The other word of caution is that we can't go crazy creating copies of
> this. It is relatively expensive time wise to setup the gateway and
> ldap like this. Therefore we need to be very deliberate about how we
> combine functional tests into suites.
>
> Let me know if you have questions.
>
> Kevin.
>
> On 11/26/13 5:32 PM, Kevin Minder (JIRA) wrote:
>> Kevin Minder created KNOX-210:
>> ---------------------------------
>>
>> Summary: Create functional test template
>> Key: KNOX-210
>> URL: https://issues.apache.org/jira/browse/KNOX-210
>> Project: Apache Knox
>> Issue Type: Test
>> Components: Server
>> Affects Versions: 0.3.0
>> Reporter: Kevin Minder
>> Fix For: 0.4.0
>>
>>
>>
>>
>>
>>
>> --
>> This message was sent by Atlassian JIRA
>> (v6.1#6144)
>
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Functional test template
Posted by Kevin Minder <ke...@hortonworks.com>.
Hi Everyone,
I added a "sample" functional test since I know this can be hard to get
your head around.
https://issues.apache.org/jira/browse/KNOX-210
These are the files that make up the sample and a brief description of
what they are for.
gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
This is the test itself. It start ldap and gateway servers with a
specific topology and users, etc.
gateway-test/src/test/resources/org/apache/hadoop/gateway/GatewaySampleFuncTest/users.ldif
These are the users loaded into the LDAP server.
gateway-test/src/test/java/org/apache/hadoop/gateway/TestProviderDeploymentContributor.java
gateway-test/src/test/java/org/apache/hadoop/gateway/TestServiceDeploymentContributor.java
gateway-test/src/test/java/org/apache/hadoop/gateway/TestServiceDispatchFilter.java
gateway-test/src/test/resources/META-INF/services/org.apache.hadoop.gateway.deploy.ProviderDeploymentContributor
gateway-test/src/test/resources/META-INF/services/org.apache.hadoop.gateway.deploy.ServiceDeploymentContributor
These are a "mock" provider/service. Basically it ends up deploying the
TestServiceDispatchFilter where there would normally be a regular
dispatch filter. This TestServiceDispatchFilter simply returns the
value "test-service-response" in response to all requests.
Please don't modify this an leave it as a sample moving forward.
The other word of caution is that we can't go crazy creating copies of
this. It is relatively expensive time wise to setup the gateway and
ldap like this. Therefore we need to be very deliberate about how we
combine functional tests into suites.
Let me know if you have questions.
Kevin.
On 11/26/13 5:32 PM, Kevin Minder (JIRA) wrote:
> Kevin Minder created KNOX-210:
> ---------------------------------
>
> Summary: Create functional test template
> Key: KNOX-210
> URL: https://issues.apache.org/jira/browse/KNOX-210
> Project: Apache Knox
> Issue Type: Test
> Components: Server
> Affects Versions: 0.3.0
> Reporter: Kevin Minder
> Fix For: 0.4.0
>
>
>
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.1#6144)
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.