@f5devcentral/f5-cloud-libs-consul
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -101,3 +101,3 @@ /** | ||
const jmesPathQueryOption = this.providerOptions.jmesPathQuery | ||
|| '[*].{id:ID||Node,ip:{private:Node,public:Node}}'; | ||
|| '[*].{id:ID||Node,ip:{private:Address,public:Address}}'; | ||
@@ -104,0 +104,0 @@ if (this.providerOptions.secret) { |
{ | ||
"name": "@f5devcentral/f5-cloud-libs-consul", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Hashicorp Consul implementation of f5-cloud-libs provider specific code", | ||
@@ -20,2 +20,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@f5devcentral/f5-cloud-libs": "^4.24.0-beta.1", | ||
"q": "^1.5.1" | ||
@@ -22,0 +23,0 @@ }, |
@@ -26,2 +26,3 @@ /** | ||
const origRunShellCommand = cloudUtil.runShellCommand; | ||
const origGetDataFromUrl = cloudUtil.getDataFromUrl; | ||
const origReadFile = fs.readFile; | ||
@@ -51,2 +52,8 @@ | ||
function mockGetDataFromUrl(response) { | ||
cloudUtil.getDataFromUrl = function getDataFromUrl() { | ||
return response; | ||
}; | ||
} | ||
// Our tests cause too many event listeners. Turn off the check. | ||
@@ -65,2 +72,3 @@ process.setMaxListeners(0); | ||
cloudUtil.runShellCommand = origRunShellCommand; | ||
cloudUtil.getDataFromUrl = origGetDataFromUrl; | ||
fs.readFile = origReadFile; | ||
@@ -240,4 +248,47 @@ callback(); | ||
}); | ||
}, | ||
testJmesPath(test) { | ||
const consulResponse = [ | ||
{ | ||
ID: '40e4a748-2192-161a-0510-9bf59fe950b5', | ||
Node: 'test-node-1', | ||
Address: '192.0.1.100' | ||
}, | ||
{ | ||
ID: '8f246b77-f3e1-ff88-5b48-8ec93abf3e05', | ||
Node: 'test-node-2', | ||
Address: '192.0.1.200' | ||
} | ||
]; | ||
mockGetDataFromUrl(q(consulResponse)); | ||
testProvider.getNodesFromUri('https://example.com') | ||
.then((processedData) => { | ||
test.deepEqual(processedData, [ | ||
{ | ||
id: '40e4a748-2192-161a-0510-9bf59fe950b5', | ||
ip: { | ||
public: '192.0.1.100', | ||
private: '192.0.1.100' | ||
} | ||
}, | ||
{ | ||
id: '8f246b77-f3e1-ff88-5b48-8ec93abf3e05', | ||
ip: { | ||
public: '192.0.1.200', | ||
private: '192.0.1.200' | ||
} | ||
} | ||
]); | ||
}) | ||
.catch((err) => { | ||
test.ok(false, err); | ||
}) | ||
.finally(() => { | ||
test.done(); | ||
}); | ||
} | ||
} | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31412
8
480
3
+ Added@f5devcentral/f5-cloud-libs@4.29.0(transitive)
- Removed@f5devcentral/f5-cloud-libs@4.28.1-beta.1(transitive)