style(portal-data): conform tests to belly-button
This commit is contained in:
parent
c327f9f1ef
commit
150a9e45ad
@ -21,7 +21,7 @@ describe('connect()', function() {
|
||||
});
|
||||
|
||||
describe.skip('createDeployment()', () => {
|
||||
it('creates a deployment record in the deployment table', done => {
|
||||
it('creates a deployment record in the deployment table', (done) => {
|
||||
const data = new PortalData(internals.options);
|
||||
const deployment = {
|
||||
name: 'User Services',
|
||||
@ -35,19 +35,19 @@ describe.skip('createDeployment()', () => {
|
||||
.createDeployment({
|
||||
deployment
|
||||
})
|
||||
.then(deployment => {
|
||||
.then((deployment) => {
|
||||
expect(deployment.id).to.exist();
|
||||
done();
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
expect(err).to.not.exist();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe.skip('getDeployment()', () => {
|
||||
it('will retrieve an existing deployment', done => {
|
||||
it('will retrieve an existing deployment', (done) => {
|
||||
const data = new PortalData(internals.options);
|
||||
data.connect().then(() => {
|
||||
const deployment = {
|
||||
@ -55,9 +55,9 @@ describe.skip('getDeployment()', () => {
|
||||
datacenter: 'us-sw-1'
|
||||
};
|
||||
|
||||
data.createDeployment(deployment).then(deployment => {
|
||||
data.createDeployment(deployment).then((deployment) => {
|
||||
expect(deployment.id).to.exist();
|
||||
data.getDeployment(deployment.id).then(retrievedDeployment => {
|
||||
data.getDeployment(deployment.id).then((retrievedDeployment) => {
|
||||
expect(deployment).to.equal(retrievedDeployment);
|
||||
done();
|
||||
});
|
||||
@ -67,7 +67,7 @@ describe.skip('getDeployment()', () => {
|
||||
});
|
||||
|
||||
describe.skip('updateService()', () => {
|
||||
it('will update the services for an existing deployment', done => {
|
||||
it('will update the services for an existing deployment', (done) => {
|
||||
const data = new PortalData(internals.options);
|
||||
data.connect().then(() => {
|
||||
const deployment = {
|
||||
@ -88,9 +88,9 @@ describe.skip('updateService()', () => {
|
||||
count: 1
|
||||
};
|
||||
|
||||
data.createDeployment(deployment).then(deployment => {
|
||||
data.createDeployment(deployment).then((deployment) => {
|
||||
expect(deployment.id).to.exist();
|
||||
data.updateService(deployment.id, service).then(updatedService => {
|
||||
data.updateService(deployment.id, service).then((updatedService) => {
|
||||
expect(updatedService).to.equal(service);
|
||||
done();
|
||||
});
|
||||
@ -100,7 +100,7 @@ describe.skip('updateService()', () => {
|
||||
});
|
||||
|
||||
describe.skip('deploymentChanges()', () => {
|
||||
it('will execute the handler when a deployment service changes', done => {
|
||||
it('will execute the handler when a deployment service changes', (done) => {
|
||||
const data = new PortalData(internals.options);
|
||||
data.connect().then(() => {
|
||||
const deployment = {
|
||||
@ -149,9 +149,9 @@ describe.skip('deploymentChanges()', () => {
|
||||
count: 3
|
||||
};
|
||||
|
||||
data.createDeployment(deployment).then(deployment => {
|
||||
data.createDeployment(deployment).then((deployment) => {
|
||||
expect(deployment.id).to.exist();
|
||||
data.updateService(deployment.id, service1).then(updatedService1 => {
|
||||
data.updateService(deployment.id, service1).then((updatedService1) => {
|
||||
expect(updatedService1).to.equal(service1);
|
||||
|
||||
let executed = false;
|
||||
@ -170,7 +170,7 @@ describe.skip('deploymentChanges()', () => {
|
||||
.then(() => {
|
||||
data
|
||||
.updateService(deployment.id, service2)
|
||||
.then(updatedService2 => {
|
||||
.then((updatedService2) => {
|
||||
expect(updatedService2).to.equal(service2);
|
||||
});
|
||||
});
|
||||
@ -181,7 +181,7 @@ describe.skip('deploymentChanges()', () => {
|
||||
});
|
||||
|
||||
describe.skip('insertMetrics()', () => {
|
||||
it("will add new metrics to a service and won't overwrite existing ones", done => {
|
||||
it("will add new metrics to a service and won't overwrite existing ones", (done) => {
|
||||
const data = new PortalData(internals.options);
|
||||
data.connect().then(() => {
|
||||
const containerId = '81205d4a-92f4-c4d9-da8a-aafd689eeabb';
|
||||
@ -203,12 +203,12 @@ describe.skip('insertMetrics()', () => {
|
||||
}
|
||||
];
|
||||
|
||||
data.insertMetrics(containerId, metrics1).then(result1 => {
|
||||
data.insertMetrics(containerId, metrics1).then((result1) => {
|
||||
expect(result1.id).to.equal(containerId);
|
||||
expect(result1.metrics).to.equal(metrics1);
|
||||
data.insertMetrics(containerId, metrics2).then(result2 => {
|
||||
data.insertMetrics(containerId, metrics2).then((result2) => {
|
||||
expect(result2.id).to.equal(containerId);
|
||||
data.getMetrics(containerId).then(results => {
|
||||
data.getMetrics(containerId).then((results) => {
|
||||
expect(results.metrics.length).to.equal(2);
|
||||
done();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user