[ 
https://issues.apache.org/jira/browse/NIFI-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15118204#comment-15118204
 ] 

ASF subversion and git services commented on NIFI-1365:
-------------------------------------------------------

Commit 93aac8cff38741454211c331451372b68b745148 in nifi's branch 
refs/heads/master from [~alopresto]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=93aac8c ]

NIFI-1365

Added Groovy support for unit tests to pom with skeleton test.
Added Groovy unit tests for OCSPCertificateValidator.
Implemented positive & negative unit tests with cache injection for 
valid/revoked OCSP certificate.
Modified pom.xml to support Groovy unit tests with custom variable.

mvn clean test -Dgroovy=test

Added local cache injection into Groovy tests for OCSP certificate validation 
(see NIFI-1324 and NIFI-1364).
Set Java version to 1.7 for Groovy test src/target.
Moved Groovy unit test profile from nifi-web-security to root pom.
Added null check for algorithm argument in PGPUtil.
Changed buffer length check from ">= 0" to "> -1" because it was confusing 
other developers.
Resolved contrib-check line length issues.
Fixed contrib-check issues in OpenPGPKeyBasedEncryptorTest.
This closes #163

Signed-off-by: Matt Gilman <[email protected]>


> Support Groovy unit tests
> -------------------------
>
>                 Key: NIFI-1365
>                 URL: https://issues.apache.org/jira/browse/NIFI-1365
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Tools and Build
>    Affects Versions: 0.4.1
>            Reporter: Andy LoPresto
>            Assignee: Andy LoPresto
>              Labels: groovy, junit, spock, test
>             Fix For: 0.5.0
>
>
> I posed a question on the dev mailing list about community enthusiasm for 
> Groovy unit test support. 
> {quote}
> I am considering writing unit tests in for new development/regression testing 
> in Groovy. There are numerous advantages to this [1][2] (such as map 
> coercion, relaxed permissions on dependency injection, etc.). Mocking large 
> and complex objects, such as NiFiProperties, when only one feature is under 
> test is especially easy. I plan to write “Java-style” unit tests, but this 
> would also make TDD/BDD frameworks like Spock or Cucumber much easier to use. 
> I figured before doing this I would poll the community and see if anyone 
> strongly objects? In previous situations, I have created a custom Maven 
> profile which only runs when triggered (by an environment variable, current 
> username, etc.) to avoid polluting the environment of anyone who doesn’t want 
> the Groovy test dependencies installed. 
> Does anyone have thoughts on this?
> [1] http://www.ibm.com/developerworks/java/library/j-pg11094/index.html
> [2] 
> https://keyholesoftware.com/2015/04/13/short-on-time-switch-to-groovy-for-unit-testing/
> {quote}
> The response was positive. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to