fix(core): update

This commit is contained in:
Philipp Kunz 2019-09-13 22:37:38 +02:00
parent a48e1e035e
commit 5c6c06dee6
3 changed files with 9 additions and 2 deletions

View File

@ -103,7 +103,8 @@ tap.test('should create a service', async () => {
name: 'testService', name: 'testService',
networks: [testNetwork], networks: [testNetwork],
networkAlias: 'testService', networkAlias: 'testService',
secrets: [testSecret] secrets: [testSecret],
ports: []
}); });
await testSecret.update(`{"updated": "socool"}`); await testSecret.update(`{"updated": "socool"}`);

View File

@ -58,6 +58,8 @@ export class DockerService {
}); });
} }
const ports = [];
const secretArray: any[] = []; const secretArray: any[] = [];
for (const secret of serviceCreationDescriptor.secrets) { for (const secret of serviceCreationDescriptor.secrets) {
secretArray.push({ secretArray.push({
@ -90,7 +92,10 @@ export class DockerService {
ForceUpdate: 1 ForceUpdate: 1
}, },
Labels: labels, Labels: labels,
Networks: networkArray Networks: networkArray,
EndpointSpec: {
Ports: ports
}
}); });
const createdService = await DockerService.getServiceByName( const createdService = await DockerService.getServiceByName(

View File

@ -10,4 +10,5 @@ export interface IServiceCreationDescriptor {
networks: DockerNetwork[]; networks: DockerNetwork[];
networkAlias: string; networkAlias: string;
secrets: DockerSecret[]; secrets: DockerSecret[];
ports: string[];
} }