Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asimov-deploy-ui

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asimov-deploy-ui - npm Package Compare versions

Comparing version 0.9.6 to 0.9.7

2

app/services/agent-api-client.js

@@ -69,3 +69,3 @@ /*******************************************************************************

agents = _.filter(agents, function (agent) {
return _.filter(agent.groups, function (g) {
return _.find(agent.groups, function (g) {
return filters.agentGroups.indexOf(g) !== -1;

@@ -72,0 +72,0 @@ });

@@ -5,3 +5,3 @@ {

"author": "Ebay Inc",
"version": "0.9.6",
"version": "0.9.7",
"homepage": "https://github.com/asimov-deploy/asimov-deploy",

@@ -8,0 +8,0 @@ "license": "Apache-2.0",

@@ -51,3 +51,3 @@ require('should');

var unitListForAgentGroup = [];
var fakeAgent = { group: "groupName" };
var fakeAgent = { groups: [ "groupName" ] };
var expectedUnitList = [];

@@ -95,3 +95,3 @@

var unitList = [];
var fakeAgent = { group: "groupName", isLegacyNodeAgent: false };
var fakeAgent = { groups: ["groupName"], isLegacyNodeAgent: false };
var jsonClientOptions;

@@ -133,3 +133,3 @@ var jsonClientGetSpy;

var unitList = [];
var fakeAgent = { group: "groupName", isLegacyNodeAgent: true };
var fakeAgent = { groups: ["groupName"], isLegacyNodeAgent: true };
var jsonClientOptions;

@@ -171,3 +171,3 @@ var jsonClientGetSpy;

var unitList = [];
var fakeAgent = { group: "groupName", supportsFiltering: true };
var fakeAgent = { groups: ["groupName"], supportsFiltering: true };
var jsonClientOptions;

@@ -209,3 +209,3 @@ var jsonClientGetSpy;

var unitList = [];
var fakeAgent = { group: "groupName", supportsFiltering: false };
var fakeAgent = { groups: ["groupName"], supportsFiltering: false };
var jsonClientOptions;

@@ -247,2 +247,55 @@ var jsonClientGetSpy;

});
describe('when multiple agents registered', function() {
var unitListForAgentGroupOne = [
{
name: "test"
}
];
var fakeAgentOne = { groups: ["group1", "group2"] };
var fakeAgentTwo = { groups: ["group3"] };
var expectedUnitList = [
{
agent: fakeAgentOne,
units: [
{
name: "test"
}
]
}
];
before(function() {
var fakeConfig = {
agents: [
fakeAgentOne,
fakeAgentTwo
],
getAgent: function() {
return { url: 'agentUrl', apiKey: '12321313213' };
}
};
var restify = {
createJsonClient: function() {
return {
get: function(url, cb) {
cb(null,null,null,unitListForAgentGroupOne);
}
};
}
};
var apiClient = require("../../app/services/agent-api-client").create(fakeConfig, restify);
apiClient.getUnits({agentGroups: ['group1']}, false, function(results) {
unitListForAgentGroupOne = results;
});
});
it('should return units for agent one)', function() {
unitListForAgentGroupOne.should.deepEqual(expectedUnitList);
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc