mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
feat: tests
This commit is contained in:
44
backend/proxy/test/containers/any-with-exposed-ports.ts
Normal file
44
backend/proxy/test/containers/any-with-exposed-ports.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/* eslint-disable unicorn/no-null */
|
||||
import type {ContainerInfo} from 'dockerode';
|
||||
|
||||
export const anyContainerWithExposedPorts: ContainerInfo = {
|
||||
Command: 'sh',
|
||||
Created: 1_524_669_882,
|
||||
HostConfig: {
|
||||
NetworkMode: 'default',
|
||||
},
|
||||
Id: 'e3d3f4d18aceac2780bdb95523845d066ed25c04fc65168a5ddbd37a85671bb7',
|
||||
Image: 'ubuntu:4',
|
||||
ImageID: 'sha256:ef9f0c8c4b6f99dd208948c7aae1d042590aa18e05ebeae4f586e4b4beebeac9',
|
||||
Labels: {},
|
||||
Mounts: [],
|
||||
Names: ['/container_name_1'],
|
||||
NetworkSettings: {
|
||||
Networks: {
|
||||
bridge: {
|
||||
Aliases: null,
|
||||
EndpointID: 'da17549a086ff2c9f622e80de833e6f334afda52c8f07080428640c1716dcd14',
|
||||
Gateway: '172.18.0.1',
|
||||
GlobalIPv6Address: '',
|
||||
GlobalIPv6PrefixLen: 0,
|
||||
IPAMConfig: null,
|
||||
IPAddress: '172.18.0.3',
|
||||
IPPrefixLen: 16,
|
||||
IPv6Gateway: '',
|
||||
Links: null,
|
||||
MacAddress: '03:41:ac:11:00:23',
|
||||
NetworkID: '947ea5247cc7429e1fdebd5404fa4d15f7c05e6765f2b93ddb3bdb6aaffd1193',
|
||||
},
|
||||
},
|
||||
},
|
||||
Ports: [
|
||||
{
|
||||
IP: '0.0.0.0',
|
||||
PrivatePort: 80,
|
||||
PublicPort: 80,
|
||||
Type: 'tcp',
|
||||
},
|
||||
],
|
||||
State: 'running',
|
||||
Status: 'Up 3 minutes',
|
||||
};
|
||||
52
backend/proxy/test/containers/backend-with-exposed-ports.ts
Normal file
52
backend/proxy/test/containers/backend-with-exposed-ports.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
/* eslint-disable unicorn/no-null */
|
||||
import type {ContainerInfo} from 'dockerode';
|
||||
|
||||
export const backendContainerWithExposedPorts: ContainerInfo = {
|
||||
Command: 'node ./bin/www',
|
||||
Created: 1_524_669_882,
|
||||
HostConfig: {
|
||||
NetworkMode: 'deployment_default',
|
||||
},
|
||||
Id: 'e3d3f4d18aceac2780bdb95523845d066ed25c04fc65168a5ddbd37a85671bb7',
|
||||
Image: 'registry.gitlab.com/openstapps/backend/b-tu-typescript-refactor-for-new-tslint-config',
|
||||
ImageID: 'sha256:ef9f0c8c4b6f99dd208948c7aae1d042590aa18e05ebeae4f586e4b4beebeac9',
|
||||
Labels: {
|
||||
'com.docker.compose.config-hash': '91c6e0cebad15951824162c93392b6880b69599692f07798ae8de659c1616a03',
|
||||
'com.docker.compose.container-number': '1',
|
||||
'com.docker.compose.oneoff': 'False',
|
||||
'com.docker.compose.project': 'deployment',
|
||||
'com.docker.compose.service': 'backend',
|
||||
'com.docker.compose.version': '1.21.0',
|
||||
'stapps.version': '1.0.0',
|
||||
},
|
||||
Mounts: [],
|
||||
Names: ['/deployment_backend_1'],
|
||||
NetworkSettings: {
|
||||
Networks: {
|
||||
deployment_default: {
|
||||
Aliases: null,
|
||||
EndpointID: 'da17549a086ff2c9f622e80de833e6f334afda52c8f07080428640c1716dcd14',
|
||||
Gateway: '172.18.0.1',
|
||||
GlobalIPv6Address: '',
|
||||
GlobalIPv6PrefixLen: 0,
|
||||
IPAMConfig: null,
|
||||
IPAddress: '172.18.0.3',
|
||||
IPPrefixLen: 16,
|
||||
IPv6Gateway: '',
|
||||
Links: null,
|
||||
MacAddress: '03:41:ac:11:00:23',
|
||||
NetworkID: '947ea5247cc7429e1fdebd5404fa4d15f7c05e6765f2b93ddb3bdb6aaffd1193',
|
||||
},
|
||||
},
|
||||
},
|
||||
Ports: [
|
||||
{
|
||||
IP: '127.0.0.1',
|
||||
PrivatePort: 3000,
|
||||
PublicPort: 3000,
|
||||
Type: 'tcp',
|
||||
},
|
||||
],
|
||||
State: 'running',
|
||||
Status: 'Up 3 minutes',
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
/* eslint-disable unicorn/no-null */
|
||||
import type {ContainerInfo} from 'dockerode';
|
||||
|
||||
export const swarmBackendContainerWithExposedPorts: ContainerInfo = {
|
||||
Command: 'node ./bin/www',
|
||||
Created: 1_524_669_882,
|
||||
HostConfig: {
|
||||
NetworkMode: 'swarm_default',
|
||||
},
|
||||
Id: 'e3d3f4d18aceac2780bdb95523845d066ed25c04fc65168a5ddbd37a85671bb7',
|
||||
Image: 'registry.gitlab.com/openstapps/backend/b-tu-typescript-refactor-for-new-tslint-config',
|
||||
ImageID: 'sha256:ef9f0c8c4b6f99dd208948c7aae1d042590aa18e05ebeae4f586e4b4beebeac9',
|
||||
Labels: {
|
||||
'com.docker.compose.config-hash': '91c6e0cebad15951824162c93392b6880b69599692f07798ae8de659c1616a03',
|
||||
'com.docker.compose.container-number': '1',
|
||||
'com.docker.compose.oneoff': 'False',
|
||||
'com.docker.stack.namespace': 'deployment',
|
||||
'com.docker.swarm.service.name': 'deployment_backend',
|
||||
'com.docker.compose.version': '1.21.0',
|
||||
'stapps.version': '1.0.0',
|
||||
},
|
||||
Mounts: [],
|
||||
Names: ['/deployment_backend_1'],
|
||||
NetworkSettings: {
|
||||
Networks: {
|
||||
ingress: {
|
||||
Aliases: null,
|
||||
EndpointID: 'da17549a086ff2c9f622e80de833e6f334afda52c8f07080428640c1716dcd14',
|
||||
Gateway: '172.18.0.1',
|
||||
GlobalIPv6Address: '',
|
||||
GlobalIPv6PrefixLen: 0,
|
||||
IPAMConfig: null,
|
||||
IPAddress: '172.18.0.3',
|
||||
IPPrefixLen: 16,
|
||||
IPv6Gateway: '',
|
||||
Links: null,
|
||||
MacAddress: '03:41:ac:11:00:23',
|
||||
NetworkID: '947ea5247cc7429e1fdebd5404fa4d15f7c05e6765f2b93ddb3bdb6aaffd1193',
|
||||
},
|
||||
},
|
||||
},
|
||||
Ports: [
|
||||
{
|
||||
IP: 'delete me',
|
||||
PrivatePort: 3000,
|
||||
PublicPort: 3000,
|
||||
Type: 'tcp',
|
||||
},
|
||||
],
|
||||
State: 'running',
|
||||
Status: 'Up 3 minutes',
|
||||
};
|
||||
Reference in New Issue
Block a user