mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 02:06:01 +00:00
kill port in CY tests
This commit is contained in:
@@ -24,13 +24,13 @@
|
|||||||
"cy:run:oauth:local": "cypress run --spec cypress/e2e/oauth.cy.js",
|
"cy:run:oauth:local": "cypress run --spec cypress/e2e/oauth.cy.js",
|
||||||
"cy:run:oauth:ci": "cypress run --env runOnCI=true --spec cypress/e2e/oauth.cy.js",
|
"cy:run:oauth:ci": "cypress run --env runOnCI=true --spec cypress/e2e/oauth.cy.js",
|
||||||
|
|
||||||
"start:add-connection": "cd .. && node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:add-connection": "cd .. && kill-port 3000 && node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
|
|
||||||
"start:portal:local": "cd .. && env-cmd -f e2e-tests/env/portal-local/.env node e2e-tests/init/portal.js && env-cmd -f e2e-tests/env/portal-local/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:portal:local": "cd .. && kill-port 3000 && env-cmd -f e2e-tests/env/portal-local/.env node e2e-tests/init/portal.js && env-cmd -f e2e-tests/env/portal-local/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
"start:portal:ci": "cd .. && env-cmd -f e2e-tests/env/portal-ci/.env node e2e-tests/init/portal.js && env-cmd -f e2e-tests/env/portal-ci/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:portal:ci": "cd .. && kill-port 3000 && env-cmd -f e2e-tests/env/portal-ci/.env node e2e-tests/init/portal.js && env-cmd -f e2e-tests/env/portal-ci/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
|
|
||||||
"start:oauth:local": "cd .. && env-cmd -f e2e-tests/env/oauth-local/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:oauth:local": "cd .. && kill-port 3000 && env-cmd -f e2e-tests/env/oauth-local/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
"start:oauth:ci": "cd .. && env-cmd -f e2e-tests/env/oauth-ci/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:oauth:ci": "cd .. && kill-port 3000 && env-cmd -f e2e-tests/env/oauth-ci/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
|
|
||||||
"test:ci": "start-server-and-test start:add-connection http://localhost:3000 cy:run:add-connection:ci && start-server-and-test start:portal:ci http://localhost:3000 cy:run:portal:ci && start-server-and-test start:oauth:ci http://localhost:3000 cy:run:oauth:ci",
|
"test:ci": "start-server-and-test start:add-connection http://localhost:3000 cy:run:add-connection:ci && start-server-and-test start:portal:ci http://localhost:3000 cy:run:portal:ci && start-server-and-test start:oauth:ci http://localhost:3000 cy:run:oauth:ci",
|
||||||
"test:local": "start-server-and-test start:add-connection http://localhost:3000 cy:run:add-connection:local && start-server-and-test start:portal:local http://localhost:3000 cy:run:portal:local && start-server-and-test start:oauth:local http://localhost:3000 cy:run:oauth:local"
|
"test:local": "start-server-and-test start:add-connection http://localhost:3000 cy:run:add-connection:local && start-server-and-test start:portal:local http://localhost:3000 cy:run:portal:local && start-server-and-test start:oauth:local http://localhost:3000 cy:run:oauth:local"
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"copyfiles": "^2.2.0",
|
"copyfiles": "^2.2.0",
|
||||||
|
"kill-port": "^2.0.1",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"workspaces-run": "^1.0.1"
|
"workspaces-run": "^1.0.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
isTesting = true;
|
isTesting = true;
|
||||||
testIdRef.update(x => x + 1);
|
testIdRef.update(x => x + 1);
|
||||||
const testid = testIdRef.get();
|
const testid = testIdRef.get();
|
||||||
const resp = await apiCall('connections/test', { connection: e.detail, requestDbList });
|
const resp = await apiCall('connections/test', { connection: getCurrentConnection(), requestDbList });
|
||||||
if (testIdRef.get() != testid) return;
|
if (testIdRef.get() != testid) return;
|
||||||
|
|
||||||
isTesting = false;
|
isTesting = false;
|
||||||
@@ -124,6 +124,14 @@
|
|||||||
connection = _.omitBy(connection, (v, k) => k.startsWith('ssl'));
|
connection = _.omitBy(connection, (v, k) => k.startsWith('ssl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (values?.passwordMode == 'askPassword') {
|
||||||
|
connection = _.omit(connection, ['password']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (values?.passwordMode == 'askUser') {
|
||||||
|
connection = _.omit(connection, ['user', 'password']);
|
||||||
|
}
|
||||||
|
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
18
yarn.lock
18
yarn.lock
@@ -5537,6 +5537,11 @@ get-symbol-description@^1.0.2:
|
|||||||
es-errors "^1.3.0"
|
es-errors "^1.3.0"
|
||||||
get-intrinsic "^1.2.4"
|
get-intrinsic "^1.2.4"
|
||||||
|
|
||||||
|
get-them-args@1.3.2:
|
||||||
|
version "1.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-them-args/-/get-them-args-1.3.2.tgz#74a20ba8a4abece5ae199ad03f2bcc68fdfc9ba5"
|
||||||
|
integrity sha512-LRn8Jlk+DwZE4GTlDbT3Hikd1wSHgLMme/+7ddlqKd7ldwR6LjJgTVWzBnR01wnYGe4KgrXjg287RaI22UHmAw==
|
||||||
|
|
||||||
get-value@^2.0.3, get-value@^2.0.6:
|
get-value@^2.0.3, get-value@^2.0.6:
|
||||||
version "2.0.6"
|
version "2.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
|
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
|
||||||
@@ -8026,6 +8031,14 @@ jws@^4.0.0:
|
|||||||
jwa "^2.0.0"
|
jwa "^2.0.0"
|
||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
|
kill-port@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/kill-port/-/kill-port-2.0.1.tgz#e5e18e2706b13d54320938be42cb7d40609b15cf"
|
||||||
|
integrity sha512-e0SVOV5jFo0mx8r7bS29maVWp17qGqLBZ5ricNSajON6//kmb7qqqNnml4twNE8Dtj97UQD+gNFOaipS/q1zzQ==
|
||||||
|
dependencies:
|
||||||
|
get-them-args "1.3.2"
|
||||||
|
shell-exec "1.0.2"
|
||||||
|
|
||||||
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
|
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
|
||||||
version "3.2.2"
|
version "3.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
|
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
|
||||||
@@ -10568,6 +10581,11 @@ shebang-regex@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
||||||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||||
|
|
||||||
|
shell-exec@1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/shell-exec/-/shell-exec-1.0.2.tgz#2e9361b0fde1d73f476c4b6671fa17785f696756"
|
||||||
|
integrity sha512-jyVd+kU2X+mWKMmGhx4fpWbPsjvD53k9ivqetutVW/BQ+WIZoDoP4d8vUMGezV6saZsiNoW2f9GIhg9Dondohg==
|
||||||
|
|
||||||
shellwords@^0.1.1:
|
shellwords@^0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
|
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
|
||||||
|
|||||||
Reference in New Issue
Block a user