[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-14 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on MINIFI-374:


Commit 6283a447efea55473f4cedb860f0415ec729c00a in nifi-minifi-cpp's branch 
refs/heads/master from Andrew I. Christianson
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=6283a44 ]

MINIFI-374 Created automated tests for HTTPS integration cases

This closes #135.

Signed-off-by: Aldrin Piri 


> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++, Docker, Testing
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
> Fix For: 0.3.0
>
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-374:
---

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/135


> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++, Docker, Testing
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
> Fix For: 0.3.0
>
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-374:
---

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/135
  
Understood.  Was able to verify correctness off of that branch.  Will merge 
this in, thanks!


> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-374:
---

Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/135
  
This PR depends on the phrocker/MINIFI-339 branch. Once that's merged, 
everything will pass. In the meantime, this commit can be applied on top of 
that branch to test.


> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-374:
---

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/135
  
This now gets me past the point where the venv couldn't be created, but 
seem to be having issues with the running of the tests themselves.
```
 DEBUG:urllib3.connectionpool:http://localhost:None "DELETE 
/v1.30/networks/9edfa045d1a03039cbf5ee1a1b7622f808d7d31bc3335b637e4872638799
 HTTP/1.1" 204 0
FAILED
../docker/test/integration/test_https.py::test_invoke_listen_https_one_way 
INFO:root:Generating test certificate request
...
FAILED


==
 FAILURES 
==

_
 test_invoke_listen 
_

def test_invoke_listen():
"""
Verify sending using InvokeHTTP to a receiver using ListenHTTP.
"""

invoke_flow = (GetFile('/tmp/input') >> LogAttribute() >>
   
InvokeHTTP('http://minifi-listen:8080/contentListener', method='POST'))

listen_flow = ListenHTTP(8080) >> LogAttribute() >> 
PutFile('/tmp/output')

with DockerTestCluster(SingleFileOutputValidator('test')) as 
cluster:

cluster.put_test_data('test')
cluster.deploy_flow(listen_flow, name='minifi-listen')
cluster.deploy_flow(invoke_flow, name='minifi-invoke')

>   assert cluster.check_output()
E   assert False
E+  where False = >()
E+where > = 
.check_output

../docker/test/integration/test_http.py:36: AssertionError

__
 test_invoke_listen_https_one_way 
__

def test_invoke_listen_https_one_way():
"""
Verify sending using InvokeHTTP to a receiver using ListenHTTP 
(with TLS).
"""

cert, key = gen_cert()

# TODO define SSLContextService class & generate config yml for 
services
crt_file = '/tmp/resources/test-crt.pem'

invoke_flow = (GetFile('/tmp/input')
   >> LogAttribute()
   >> 
InvokeHTTP('https://minifi-listen:4430/contentListener',
 method='POST',
 
ssl_context_service=SSLContextService(ca_cert=crt_file)))

listen_flow = (ListenHTTP(4430, cert=crt_file)
   >> LogAttribute()
   >> PutFile('/tmp/output'))

with DockerTestCluster(SingleFileOutputValidator('test')) as 
cluster:
cluster.put_test_resource('test-crt.pem', cert.as_pem() + 
key.as_pem(None, callback))
cluster.put_test_data('test')
cluster.deploy_flow(listen_flow, name='minifi-listen')
cluster.deploy_flow(invoke_flow, name='minifi-invoke')

>   assert cluster.check_output()
E   assert False
E+  where False = >()
E+where > = 
.check_output

../docker/test/integration/test_https.py:54: AssertionError


 2 failed, 2 passed in 36.37 seconds 
=
make[3]: *** [CMakeFiles/docker-verify] Error 1
make[2]: *** [CMakeFiles/docker-verify.dir/all] Error 2
make[1]: *** [CMakeFiles/docker-verify.dir/rule] Error 2
make: *** [docker-verify] Error 2
```

Of note, and not sure if this is a contributing factor.  I did rebuild the 
image.  When I first evaluated, I believe it was using a cached version of the 
minifi-cpp built from another branch.  This isn't necessarily bad, but ma

[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-374:
---

Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/135
  
@apiri I just added a check in the verify script for openssl in homebrew. 
If brew is available & openssl is installed by it, it will automatically add 
the required CFLAGS/LDFLAGS. Please give it another go and see if this fixes 
the issue.


> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-374:
---

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/135
  
@achristianson Must have gotten mixed up on branches or repos, but seem to 
be getting an error on the build due to m2crypto.

> Failed building wheel for m2crypto
>   Running setup.py clean for m2crypto
> Failed to build m2crypto
> Installing collected packages: m2crypto, pathtools, argh, watchdog
>   Running setup.py install for m2crypto ... error
> Complete output from command 
/Users/apiri/Development/code/apache/nifi-minifi-cpp/build/test-env-py2/bin/python2.7
 -u -c "import setuptools, 
tokenize;__file__='/private/var/folders/7s/6sbtw9n10q50rdttrsd5dwq0gn/T/pip-build-CZHOP7/m2crypto/setup.py';f=getattr(tokenize,
 'open', open)(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
/var/folders/7s/6sbtw9n10q50rdttrsd5dwq0gn/T/pip-vqOR3N-record/install-record.txt
 --single-version-externally-managed --compile --install-headers 
/Users/apiri/Development/code/apache/nifi-minifi-cpp/build/test-env-py2/bin/../include/site/python2.7/m2crypto:

I was able to workaround it using largely the process outlined here; 
https://stackoverflow.com/a/33125400/231008 with the addition of doing a sudo 
pip install of m2crypto.  

Let me know if I'm overlooking something.  Thanks!


> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-374:
---

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/135
  
changes look good, will merge


> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-09-05 Thread Andrew Christianson (JIRA)

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

Andrew Christianson commented on MINIFI-374:


This is done, but relies on 
MINIFI-350/https://github.com/apache/nifi-minifi-cpp/pull/126.

> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-374) Create integration tests for HTTPS communication

2017-08-18 Thread Andrew Christianson (JIRA)

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

Andrew Christianson commented on MINIFI-374:


This requires a few changes to the test framework, which I'm working on as part 
of this:

* Support adding resources to test container filesystems (cert files)
* Support controller services in flow DSL/config generation

> Create integration tests for HTTPS communication
> 
>
> Key: MINIFI-374
> URL: https://issues.apache.org/jira/browse/MINIFI-374
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create automated tests to verify that HTTPS communications work as intended. 
> Tests will need to generate certificates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)