Skip to content

Commit

Permalink
Update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rddimon committed Jan 30, 2024
1 parent 8f9408b commit 216bdea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -27,8 +27,8 @@
"main": "dist/src/index.js",
"bin": {},
"scripts": {
"integration-basic": "nyc mocha -r ts-node/register --project tsconfig.json --parallel test/integration-tests/basic/basic.test.ts",
"integration-deploy": "nyc mocha -r ts-node/register --project tsconfig.json --parallel test/integration-tests/deploy/deploy.test.ts",
"integration-basic": "nyc mocha -r ts-node/register --project tsconfig.json test/integration-tests/basic/basic.test.ts",
"integration-deploy": "nyc mocha -r ts-node/register --project tsconfig.json test/integration-tests/deploy/deploy.test.ts",
"integration-debug": "nyc mocha -r ts-node/register --project tsconfig.json test/integration-tests/debug/debug.test.ts",
"test": "find ./test/unit-tests -name '*.test.ts' | xargs nyc mocha -r ts-node/register --project tsconfig.json --timeout 5000 && nyc report --reporter=text-summary",
"test:debug": "NODE_OPTIONS='--inspect-brk' mocha -j 1 -r ts-node/register --project tsconfig.json test/unit-tests/index.test.ts",
Expand Down
15 changes: 7 additions & 8 deletions test/integration-tests/basic/basic.test.ts
Expand Up @@ -147,21 +147,19 @@ describe("Integration Tests", function () {
}
});

it("Deploys multi base path for the same domain", async () => {
const testName = "deploy-idempotent2";
it("Deploy multi domains", async () => {
const testName = "http-api-multiple";
const configFolder = `${CONFIGS_FOLDER}/${testName}`;
try {
await utilities.createTempDir(TEMP_DIR, configFolder);
await utilities.slsCreateDomain(TEMP_DIR);
await utilities.slsDeploy(TEMP_DIR);
await utilities.slsDeploy(TEMP_DIR);
} finally {
await utilities.destroyResources(testName);
}
});

it("Deploy multi domains", async () => {
const testName = "http-api-multiple";
it("Mutual TLS", async () => {
const testName = "mutual-tls";
const configFolder = `${CONFIGS_FOLDER}/${testName}`;
try {
await utilities.createTempDir(TEMP_DIR, configFolder);
Expand All @@ -171,12 +169,13 @@ describe("Integration Tests", function () {
}
});

it("Mutual TLS", async () => {
const testName = "mutual-tls";
it("Deploys multi base path for the same domain", async () => {
const testName = "deploy-idempotent2";
const configFolder = `${CONFIGS_FOLDER}/${testName}`;
try {
await utilities.createTempDir(TEMP_DIR, configFolder);
await utilities.slsDeploy(TEMP_DIR);
await utilities.slsDeploy(TEMP_DIR);
} finally {
await utilities.destroyResources(testName);
}
Expand Down
Expand Up @@ -22,12 +22,12 @@ custom:
- rest:
autoDomain: true
basePath: "path1"
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
allowPathMatching: true
- rest:
autoDomain: true
basePath: "path2"
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
allowPathMatching: true

package:
Expand Down

0 comments on commit 216bdea

Please sign in to comment.