nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phroc...@apache.org
Subject [nifi-minifi-cpp] 03/03: MINIFICPP-909: Pass version number through CMAKE
Date Wed, 05 Jun 2019 11:07:12 GMT
This is an automated email from the ASF dual-hosted git repository.

phrocker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 7c8fe0f7c6dec276099c176882df9e22f709a1a6
Author: Marc Parisi <phrocker@apache.org>
AuthorDate: Tue Jun 4 12:55:50 2019 -0400

    MINIFICPP-909: Pass version number through CMAKE
    
    This closes #583.
    
    Signed-off-by: Marc Parisi <phrocker@apache.org>
---
 cmake/DockerConfig.cmake                           | 2 +-
 docker/DockerVerify.sh                             | 3 ++-
 docker/test/integration/minifi/__init__.py         | 8 --------
 docker/test/{ => integration}/test_hash_content.py | 3 +--
 4 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/cmake/DockerConfig.cmake b/cmake/DockerConfig.cmake
index b1ca54d..6f70e6c 100644
--- a/cmake/DockerConfig.cmake
+++ b/cmake/DockerConfig.cmake
@@ -52,4 +52,4 @@ add_custom_target(
 
 add_custom_target(
     docker-verify
-    COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerVerify.sh)
+    COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerVerify.sh ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
diff --git a/docker/DockerVerify.sh b/docker/DockerVerify.sh
index ae48e33..592de3c 100755
--- a/docker/DockerVerify.sh
+++ b/docker/DockerVerify.sh
@@ -19,6 +19,8 @@ set -e
 
 docker_dir="$( cd ${0%/*} && pwd )"
 
+export MINIFI_VERSION=$1
+
 # Create virutal environment for testing
 if [[ ! -d ./test-env-py3 ]]; then
   echo "Creating virtual environment in ./test-env-py3" 1>&2
@@ -49,7 +51,6 @@ pip install --upgrade \
 export JAVA_HOME="/usr/lib/jvm/default-jvm"
 export PATH="$PATH:/usr/lib/jvm/default-jvm/bin"
 
-export MINIFI_VERSION=0.6.0
 export PYTHONPATH="${PYTHONPATH}:${docker_dir}/test/integration"
 
 exec pytest -s -v "${docker_dir}"/test/integration
diff --git a/docker/test/integration/minifi/__init__.py b/docker/test/integration/minifi/__init__.py
index a13ba2f..d8b280b 100644
--- a/docker/test/integration/minifi/__init__.py
+++ b/docker/test/integration/minifi/__init__.py
@@ -421,20 +421,12 @@ class DebugFlow(Processor):
     def __init__(self, ):
         super(DebugFlow, self).__init__('DebugFlow')
 
-class HashAttribute(Processor):
-    def __init__(self, attributename):
-        super(HashAttribute, self).__init__('HashAttribute',
-                                           properties={'Hash Value Attribute Key': attributename},
-                                           auto_terminate=['failure'])
-
 class AttributesToJSON(Processor):
     def __init__(self, destination, attributes):
         super(AttributesToJSON, self).__init__('AttributesToJSON',
                                       properties={'Destination': destination, 'Attributes
List': attributes},
                                       schedule={'scheduling period': '0 sec'},
                                       auto_terminate=['failure'])
-        
-
 class GetFile(Processor):
     def __init__(self, input_dir):
         super(GetFile, self).__init__('GetFile',
diff --git a/docker/test/test_hash_content.py b/docker/test/integration/test_hash_content.py
similarity index 89%
rename from docker/test/test_hash_content.py
rename to docker/test/integration/test_hash_content.py
index 5dab499..1482014 100644
--- a/docker/test/test_hash_content.py
+++ b/docker/test/integration/test_hash_content.py
@@ -21,8 +21,7 @@ def test_hash_invoke():
     """
     Verify sending using InvokeHTTP to a receiver using ListenHTTP.
     """
-
-    invoke_flow = (GetFile('/tmp/input') >> HashAttribute('hash') 
+    invoke_flow = (GetFile('/tmp/input') >> Processor(name='HashContent',clazz='HashContent',properties={'Hash
Attribute': 'hash'},auto_terminate=['failure']) 
                    >> InvokeHTTP('http://minifi-listen:8080/contentListener', method='POST'))
 
     listen_flow = ListenHTTP(8080)  >> LogAttribute() >>  PutFile('/tmp/output')


Mime
View raw message