mirror of https://github.com/apache/nifi.git
NIFI-6944 This closes #3928. fixed NiFiClientUtil.getUrl and modified NiFiClientUtilSpec to test non-default WEB_HTTP_PORT
Signed-off-by: Joe Witt <joewitt@apache.org>
This commit is contained in:
parent
de2a286a7a
commit
3015ee39da
|
@ -56,7 +56,7 @@ public class NiFiClientUtil {
|
|||
urlBuilder.append("http://")
|
||||
urlBuilder.append(StringUtils.isEmpty(niFiProperties.getProperty(NiFiProperties.WEB_HTTP_HOST)) ? "localhost": niFiProperties.getProperty(NiFiProperties.WEB_HTTP_HOST))
|
||||
urlBuilder.append(":")
|
||||
urlBuilder.append(StringUtils.isEmpty(niFiProperties.getProperty(NiFiProperties.WEB_HTTPS_PORT)) ? "8080": niFiProperties.getProperty(NiFiProperties.WEB_HTTPS_PORT))
|
||||
urlBuilder.append(StringUtils.isEmpty(niFiProperties.getProperty(NiFiProperties.WEB_HTTP_PORT)) ? "8080": niFiProperties.getProperty(NiFiProperties.WEB_HTTP_PORT))
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(endpoint)) {
|
||||
|
|
|
@ -47,8 +47,9 @@ class NiFiClientUtilSpec extends Specification{
|
|||
|
||||
then:
|
||||
|
||||
3 * niFiProperties.getProperty(_)
|
||||
url == "http://localhost:8080/nifi-api/controller/cluster/nodes/1"
|
||||
2 * niFiProperties.getProperty(_)
|
||||
niFiProperties.getProperty(NiFiProperties.WEB_HTTP_PORT) >> "8000"
|
||||
url == "http://localhost:8000/nifi-api/controller/cluster/nodes/1"
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue