Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32179369
D15191.1765072931.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D15191.1765072931.diff
View Options
diff --git a/services/package.json b/services/package.json
--- a/services/package.json
+++ b/services/package.json
@@ -4,14 +4,6 @@
"private": true,
"license": "BSD-3-Clause",
"scripts": {
- "build-all": "docker-compose build",
- "run-tunnelbroker-service": "./scripts/run_server_image.sh tunnelbroker",
- "run-backup-service": "./scripts/run_server_image.sh backup",
- "run-blob-service": "./scripts/run_server_image.sh blob",
- "run-feature-flags-service": "./scripts/run_server_image.sh feature-flags",
- "run-all-services": "./scripts/run_all_services.sh",
- "run-integration-tests": "./scripts/run_integration_tests.sh",
- "run-performance-tests": "./scripts/run_performance_tests.sh",
"init-local-cloud": "./scripts/init_local_cloud.sh",
"delete-local-cloud": "docker-compose down -v",
"reset-local-cloud": "yarn delete-local-cloud && yarn init-local-cloud",
diff --git a/services/scripts/list_services.sh b/services/scripts/list_services.sh
deleted file mode 100755
--- a/services/scripts/list_services.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-find . -maxdepth 1 \
- -type d \
- ! -name "docker-compose.yml" \
- ! -name "package.json" \
- ! -name "scripts" \
- ! -name "node_modules" \
- ! -name "commtest" \
- ! -name "terraform" \
- ! -name ".*" \
- -print0 | xargs -0 -n1 basename
diff --git a/services/scripts/run_all_services.sh b/services/scripts/run_all_services.sh
deleted file mode 100755
--- a/services/scripts/run_all_services.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-SERVICES_LIST=$(./scripts/list_services.sh)
-SERVICES=""
-for SERVICE in $SERVICES_LIST; do
- SERVICES="$SERVICES $SERVICE-server"
-done
-
-docker-compose up "$SERVICES"
diff --git a/services/scripts/run_integration_tests.sh b/services/scripts/run_integration_tests.sh
deleted file mode 100755
--- a/services/scripts/run_integration_tests.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-export COMM_SERVICES_SANDBOX=1
-
-SERVICES=$(./scripts/list_services.sh)
-
-run_integration_test () {
- echo "integration tests tests will be run for the $1 service"
- # add -- --nocapture in the end to enable logs
- cargo test "$1"_integration_test --test '*' --manifest-path=commtest/Cargo.toml #-- --nocapture
-}
-
-list_expected () {
- echo "Expected one of these:";
- echo "$SERVICES";
- echo "all";
-}
-
-if [[ -z "$1" ]]; then
- echo "No service specified";
- list_expected;
- exit 1;
-fi
-
-if [[ "$1" == "all" ]]; then
- for SERVICE in $SERVICES; do
- run_integration_test "$SERVICE"
- done
- exit 0;
-fi;
-
-SERVICE=$(grep "$1" <<< "$SERVICES")
-
-if [[ "$SERVICE" != "$1" ]]; then
- echo "No such service: $1";
- list_expected;
- exit 1;
-fi;
-
-set -o allexport
-# shellcheck source=/dev/null
-source .env
-set +o allexport
-
-run_integration_test "$SERVICE"
diff --git a/services/scripts/run_performance_tests.sh b/services/scripts/run_performance_tests.sh
deleted file mode 100755
--- a/services/scripts/run_performance_tests.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-SERVICES=$(./scripts/list_services.sh)
-
-run_performance_test () {
- echo "performance tests tests will be run for the $1 service"
- # add -- --nocapture in the end to enable logs
- cargo test "$1"_performance_test --test '*' --manifest-path=commtest/Cargo.toml #-- --nocapture
-}
-
-help () {
- echo "Usage:";
- echo "There are two arguments you can specify";
- echo "First is a target service:";
- echo "$SERVICES";
- echo "all";
- echo "Second is a number of threads that you'd like to spawn.";
- echo "It is optional, if not specified, it will fall back to a default value";
- echo "The default value is the number of CPUs";
-}
-
-if [[ -z "$1" ]]; then
- echo "No service specified" >&2
- help;
- exit 1
-fi
-
-export COMM_NUMBER_OF_THREADS="$2"
-
-if [[ "$1" == "all" ]]; then
- for SERVICE in $SERVICES; do
- run_performance_test "$SERVICE"
- done
- exit 0;
-fi;
-
-SERVICE=$(grep "$1" <<< "$SERVICES")
-
-if [[ "$SERVICE" != "$1" ]]; then
- echo "No such service: $1";
- help;
- exit 1;
-fi;
-
-SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd -P)
-
-set -o allexport
-# shellcheck source=/dev/null
-source "$SCRIPT_DIR/../.env"
-set +o allexport
-
-run_performance_test "$SERVICE"
diff --git a/services/scripts/run_server_image.sh b/services/scripts/run_server_image.sh
deleted file mode 100755
--- a/services/scripts/run_server_image.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-if [[ "$#" -lt 1 ]] || [[ "$#" -gt 2 ]]; then
- echo "Illegal number of arguments, expected 2:"
- echo "- one argument with a name of the service, currently available services:"
- ./scripts/list_services.sh
- echo "- one optional argument with port"
- echo "- example: ./services/scripts/run_server_image.sh tunnelbroker 12345"
- exit 1;
-fi
-
-SERVICE=$1
-if [[ "$SERVICE" == "tunnelbroker" ]]; then
- if [[ -n "$2" ]]; then
- export COMM_SERVICES_PORT_TUNNELBROKER=$2
- fi
-elif [[ "$SERVICE" == "backup" ]]; then
- if [[ -n "$2" ]]; then
- export COMM_SERVICES_PORT_BACKUP=$2
- fi
-elif [[ "$SERVICE" == "blob" ]]; then
- if [[ -n "$2" ]]; then
- export COMM_SERVICES_PORT_BLOB=$2
- fi
-elif [[ "$SERVICE" == "feature-flags" ]]; then
- if [[ -n "$2" ]]; then
- export COMM_SERVICES_PORT_FEATURE_FLAGS=$2
- fi
-else
- echo "No such service ${SERVICE}, aborting"
- exit 1
-fi
-
-docker-compose build "$SERVICE"-server
-docker-compose up "$SERVICE"-server
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 2:02 AM (8 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5842079
Default Alt Text
D15191.1765072931.diff (5 KB)
Attached To
Mode
D15191: [services] Remove unused scripts
Attached
Detach File
Event Timeline
Log In to Comment