From 09149dcbd3c93e85c454dfdaad0273781b0924b9 Mon Sep 17 00:00:00 2001 From: rddimon Date: Tue, 6 Feb 2024 20:08:49 +0200 Subject: [PATCH] AT-11105: remove debug test https://amplify-education.atlassian.net/browse/AT-11105 --- package.json | 1 - test/integration-tests/debug/debug.test.ts | 25 --------------- .../debug/pr-example/handler.js | 13 -------- .../debug/pr-example/serverless.yml | 32 ------------------- 4 files changed, 71 deletions(-) delete mode 100644 test/integration-tests/debug/debug.test.ts delete mode 100644 test/integration-tests/debug/pr-example/handler.js delete mode 100644 test/integration-tests/debug/pr-example/serverless.yml diff --git a/package.json b/package.json index 1dba3ebe..111ee794 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "scripts": { "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", "integration-test": "npm run integration-basic && npm run integration-deploy", diff --git a/test/integration-tests/debug/debug.test.ts b/test/integration-tests/debug/debug.test.ts deleted file mode 100644 index c0195ad8..00000000 --- a/test/integration-tests/debug/debug.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import "mocha"; -import utilities = require("../test-utilities"); -import { TEMP_DIR } from "../base"; - -const CONFIGS_FOLDER = "debug"; -const TIMEOUT_MINUTES = 15 * 60 * 1000; // 15 minutes in milliseconds - -describe("Integration Tests", function () { - this.timeout(TIMEOUT_MINUTES); - - it("Creates pr-example", async () => { - const testName = "pr-example"; - const configFolder = `${CONFIGS_FOLDER}/${testName}`; - - try { - await utilities.createTempDir(TEMP_DIR, configFolder); - await utilities.slsCreateDomain(TEMP_DIR, true); - await utilities.slsDeploy(TEMP_DIR, true); - // run again to make sure the deployment is succeeded - await utilities.slsDeploy(TEMP_DIR, true); - } finally { - await utilities.destroyResources(testName); - } - }); -}); diff --git a/test/integration-tests/debug/pr-example/handler.js b/test/integration-tests/debug/pr-example/handler.js deleted file mode 100644 index 1729e0e1..00000000 --- a/test/integration-tests/debug/pr-example/handler.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -module.exports.helloWorld = (event, _context, callback) => { - const response = { - statusCode: 200, - body: JSON.stringify({ - message: "Go Serverless! Your function executed successfully!", - input: event, - }), - }; - - callback(null, response); -}; diff --git a/test/integration-tests/debug/pr-example/serverless.yml b/test/integration-tests/debug/pr-example/serverless.yml deleted file mode 100644 index 24e20572..00000000 --- a/test/integration-tests/debug/pr-example/serverless.yml +++ /dev/null @@ -1,32 +0,0 @@ -service: ${env:PLUGIN_IDENTIFIER}-pr-example -provider: - name: aws - iam: - role: arn:aws:iam::${aws:accountId}:role/sls_domain_manager_lambda - runtime: nodejs16.x - region: us-west-2 - stage: test -functions: - helloWorld: - handler: handler.helloWorld - events: - - httpApi: - path: /hello-world - method: get - -plugins: - - serverless-domain-manager - -custom: - customDomain: - domainName: ${env:PLUGIN_IDENTIFIER}-pr-example.${env:TEST_DOMAIN} - basePath: '' - createRoute53Record: true - stage: 'production' - endpointType: 'regional' - apiType: http - autoDomain: true - -package: - patterns: - - '!node_modules/**'