mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 19:52:53 +00:00
test: make tests readable
This commit is contained in:
@@ -143,7 +143,7 @@ export class MainSpec {
|
||||
}
|
||||
|
||||
@test
|
||||
checkIfContainerDoesNotMatchAnyContainer() {
|
||||
'check if container does not match any container'() {
|
||||
expect(containerMatchesRegex(
|
||||
'anyName',
|
||||
new RegExp('d+'),
|
||||
@@ -152,7 +152,7 @@ export class MainSpec {
|
||||
}
|
||||
|
||||
@test
|
||||
checkIfContainerDoesNotMatchIfVersionIsIncorrect() {
|
||||
'check if container does not match if version is incorrect'() {
|
||||
expect(containerMatchesRegex(
|
||||
'backend',
|
||||
new RegExp('1\\.4\\.\\d+'),
|
||||
@@ -161,7 +161,7 @@ export class MainSpec {
|
||||
}
|
||||
|
||||
@test
|
||||
checkIfContainerMatches() {
|
||||
'check if container matches'() {
|
||||
expect(containerMatchesRegex(
|
||||
'backend',
|
||||
new RegExp('1\\.0\\.\\d+'),
|
||||
@@ -170,7 +170,7 @@ export class MainSpec {
|
||||
}
|
||||
|
||||
@test
|
||||
async getGatewayOfAnyContainerWithExposedPorts() {
|
||||
async 'get gateway of any container with exposed ports'() {
|
||||
expect(await getGatewayOfStAppsBackend(MainSpec.anyContainerWithExposedPorts)).to.be.equal('0.0.0.0:80');
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ export class MainSpec {
|
||||
}
|
||||
|
||||
@test
|
||||
async upstreamMapCallsLoggerErrorWhenNoMatchingContainerIsFound() {
|
||||
async 'upstream map calls logger error when no matching container is found'() {
|
||||
const spy = MainSpec.sandbox.on(console, 'error', () => {
|
||||
});
|
||||
|
||||
@@ -214,7 +214,7 @@ export class MainSpec {
|
||||
}
|
||||
|
||||
@test
|
||||
async upstreamMapWithOneActiveVersionAndNoOutdatedOnes() {
|
||||
async 'upstream map with one active version and no outdated ones'() {
|
||||
expect(await generateUpstreamMap(
|
||||
['1\\.0\\.\\d+'],
|
||||
['0\\.8\\.\\d+'],
|
||||
@@ -231,7 +231,7 @@ upstream 1__0___d_ {
|
||||
}
|
||||
|
||||
@test
|
||||
async testGetContainers() {
|
||||
async 'get containers'() {
|
||||
try {
|
||||
await getContainers();
|
||||
return false;
|
||||
@@ -254,7 +254,7 @@ Please check if docker is running and Node.js can access the docker socket (/var
|
||||
}
|
||||
|
||||
@test
|
||||
async testGetTemplateView() {
|
||||
async 'get template view'() {
|
||||
|
||||
try {
|
||||
let containersWithSameVersion = [MainSpec.backendContainerWithExposedPorts, MainSpec.backendContainerWithExposedPorts];
|
||||
@@ -269,7 +269,7 @@ Please check if docker is running and Node.js can access the docker socket (/var
|
||||
}
|
||||
|
||||
@test
|
||||
createListenerFaultyConfig() {
|
||||
'create listener faulty config'() {
|
||||
|
||||
expect(generateListener({
|
||||
certificate: 'faultyTest',
|
||||
@@ -285,7 +285,7 @@ ${protocolHardeningParameters}
|
||||
}
|
||||
|
||||
@test
|
||||
createListenerCorrectConfig() {
|
||||
'create listener correct config'() {
|
||||
const testCertDir = resolve(__dirname, 'certs');
|
||||
mkdirSync(testCertDir);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user