From e44d75d43eae95ce4c63df13953b70c7ec7875d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E5=AE=87?= Date: Tue, 25 Feb 2020 23:14:57 +0800 Subject: [PATCH] Remove legacy integration folder and update vendor. --- Makefile | 15 -- go.sum | 2 - integration/InteractiveEnvironments.md | 223 ------------------------- integration/check-route-finder.sh | 11 -- integration/check-services.sh | 43 ----- integration/generic/env-vars.sh | 26 --- integration/generic/visorA.json | 48 ------ integration/generic/visorC.json | 54 ------ integration/intermediary-visorB.json | 34 ---- integration/messaging/env-vars.sh | 30 ---- integration/messaging/visorA.json | 43 ----- integration/messaging/visorC.json | 46 ----- integration/proxy/env-vars.sh | 24 --- integration/proxy/visorA.json | 41 ----- integration/proxy/visorC.json | 44 ----- integration/run-generic-env.sh | 26 --- integration/run-messaging-env.sh | 26 --- integration/run-proxy-env.sh | 26 --- integration/start-restart-nodeB.sh | 14 -- integration/startup.sh | 15 -- integration/tear-down.sh | 9 - integration/test-messaging-loop.sh | 8 - integration/test-messaging.sh | 3 - vendor/modules.txt | 2 +- 24 files changed, 1 insertion(+), 812 deletions(-) delete mode 100644 integration/InteractiveEnvironments.md delete mode 100644 integration/check-route-finder.sh delete mode 100644 integration/check-services.sh delete mode 100644 integration/generic/env-vars.sh delete mode 100644 integration/generic/visorA.json delete mode 100644 integration/generic/visorC.json delete mode 100644 integration/intermediary-visorB.json delete mode 100644 integration/messaging/env-vars.sh delete mode 100644 integration/messaging/visorA.json delete mode 100644 integration/messaging/visorC.json delete mode 100644 integration/proxy/env-vars.sh delete mode 100644 integration/proxy/visorA.json delete mode 100644 integration/proxy/visorC.json delete mode 100644 integration/run-generic-env.sh delete mode 100644 integration/run-messaging-env.sh delete mode 100644 integration/run-proxy-env.sh delete mode 100644 integration/start-restart-nodeB.sh delete mode 100644 integration/startup.sh delete mode 100755 integration/tear-down.sh delete mode 100644 integration/test-messaging-loop.sh delete mode 100644 integration/test-messaging.sh diff --git a/Makefile b/Makefile index 94aec7e3fb..0aa03f3c52 100644 --- a/Makefile +++ b/Makefile @@ -174,21 +174,6 @@ run-syslog: ## Run syslog-ng in docker. Logs are mounted under /tmp/syslog -docker container rm syslog-ng -f docker run -d -p 514:514/udp -v /tmp/syslog:/var/log --name syslog-ng balabit/syslog-ng:latest -integration-startup: ## Starts up the required transports between `skywire-visor`s of interactive testing environment - ./integration/startup.sh - -integration-teardown: ## Tears down all saved configs and states of integration executables - ./integration/tear-down.sh - -integration-run-generic: ## Runs the generic interactive testing environment - ./integration/run-generic-env.sh - -integration-run-messaging: ## Runs the messaging interactive testing environment - ./integration/run-messaging-env.sh - -integration-run-proxy: ## Runs the proxy interactive testing environment - ./integration/run-proxy-env.sh - mod-comm: ## Comments the 'replace' rule in go.mod ./ci_scripts/go_mod_replace.sh comment go.mod diff --git a/go.sum b/go.sum index 2c65e86669..7b4be2da74 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/SkycoinProject/dmsg v0.0.0-20200224064625-1b539081519c h1:TBwm7dzyUYnOG/Ycb3HBh7JshQavePHHfh5NOAzlNww= -github.com/SkycoinProject/dmsg v0.0.0-20200224064625-1b539081519c/go.mod h1:eCoemDDyfyfNTFrapYKNEItwtRIj54UGpu4Ffcznuds= github.com/SkycoinProject/dmsg v0.0.0-20200225140132-2d14296245d5 h1:Zk5O7e6iSPVAud3vo3MQj2higVCfeiDNG91Yc0N6+e4= github.com/SkycoinProject/dmsg v0.0.0-20200225140132-2d14296245d5/go.mod h1:eCoemDDyfyfNTFrapYKNEItwtRIj54UGpu4Ffcznuds= github.com/SkycoinProject/skycoin v0.26.0 h1:8/ZRZb2VM2DM4YTIitRJMZ3Yo/3H1FFmbCMx5o6ekmA= diff --git a/integration/InteractiveEnvironments.md b/integration/InteractiveEnvironments.md deleted file mode 100644 index 496650845f..0000000000 --- a/integration/InteractiveEnvironments.md +++ /dev/null @@ -1,223 +0,0 @@ -# Interactive test environments - -## Table of contents - -- [Interactive test environments](#interactive-test-environments) - - [Table of contents](#table-of-contents) - - [Code structure](#code-structure) - - [Dependencies](#dependencies) - - [Environments & scenarios](#environments--scenarios) - - [Base Environment](#base-environment) - - [Generic Test Environment](#generic-test-environment) - - [Proxy test environment](#proxy-test-environment) - - [Preparation](#preparation) - - [Scenario. Proxy test #1](#scenario-proxy-test-1) - - [Notes & recipes](#notes--recipes) - - [Delays](#delays) - - [Tmux for new users](#tmux-for-new-users) - - [Guidelines for new test creation](#guidelines-for-new-test-creation) - -## Code structure - -```text -integration -├── generic # Generic environment -│   ├── env-vars.sh # -│   ├── visorA.json # -│   └── visorC.json # -├── messaging # Messaging testing environment -│   ├── env-vars.sh # -│   ├── visorA.json # -│   └── visorC.json # -├── proxy # Proxy testing environment -│   ├── env-vars.sh # -│   ├── visorA.json # -│   └── visorC.json # -├── InteractiveEnvironments.md # You're reading it -├── intermediary-visorB.json # VisorB configurationS -├── run-base-env.sh # base environment in detached tmux session -├── run-generic-env.sh # generic environment in tmux -├── run-proxy-env.sh # proxy environment in tmux -├── start-restart-visorB.sh # script for restart in cycle VisorB -├── startup.sh # add transports between visors -├── tear-down.sh # tear down everything -├── test-messaging-loop.sh # Test script for messaging in infinite loop -├── test-messaging.sh # Test one message between VisorA-VisorC, VisorC-VisorA -└── test-proxy.sh # Test script for proxy -``` - -## Dependencies - -1. `tmux` (required for `integration/run-*-env.sh` scripts) -2. `jq` (required for `integration/*/env-vars.sh` scripts) -3. `bash` v3.x or greater (or compatible shell) - -**Notes for Mac OSX users** - -1. Running `tmux` in `iterm2` is known to be faulty. Consider switching to an alternative terminal emulator. -2. To install `jq` and `tmux` via brew: `brew install jq tmux` - - -## Environments & scenarios - -### Base Environment - -Base environment with `skywire-services` running on localhost - -Usage: -- as base for other environments as `source ./intergration/run-base-env.sh` in other `run-*-env.sh` scripts -- standalone: `./integration/run-base-env.sh && tmux attach -t skywire` - -### Generic Test Environment - -The generic test environment will define the following: - -- skywire-services running on localhost -- 3 `skywire-visor`s: - - VisorA, VisorC running all apps - - VisorB - intermediary visor without apps - -**Run** - -```bash -# Tear down everything -$ make integration-teardown - -# Start all services and visors -$ make integration-run-generic - -# Adds pre-defined transports -$ make integration-startup -``` - -**Stop** - -This is the recommended way to stop environment: - -```bash -$ tmux kill-session -t skywire -``` - -And optionally: - -```bash -$ make integration-teardown -``` - -**Commands** - -Instead of `../skywire/skywire-cli --rpc localhost:port [command]`, one can use: - -- `CLI_A visor ls-tp` - list transports from visorA -- `CLI_B visor add-tp $PK_A` - add transport on visorB to visorA - -Consult with `./integration/env-vars.sh` for details. - -**Tests** - -These tests assume that the generic environment is running (via the aforementioned steps). - -- **TEST 1: Send messages back and forth once.** - ```bash - # To be run in the 'shell' tab of tmux. - ./integration/test-messaging.sh - ``` -- **TEST 2: Test send/receive with unstable VisorB.** - 1. Stop VisorB by switching to the 7th tmux window (`Ctrl+B` & `6`) and sending SIGTERM (`Ctrl-C`). - 2. Run the following in the same window: - ```bash - $ ./integration/start-restart-visorB.sh - ``` - 3. Switch to the `shell` window and run: - ```bash - ./integration/test-messaging-loop.sh - ``` - -**Detailed Description** - -The following steps will be performed: - -1. copy sw*.json and start-restart-visorB.sh into skywire directory -2. Create 9 tmux windows: - 1. MSGD: dmsg-discovery - 2. MSG: dmsg-server - 3. TRD: transport-discovery - 4. RF: route-finder - 5. SN: setup-node - 6. VisorA: first skywire-visor with generic/visorA.json - 7. VisorB: first skywire-visor with intermediary-visorB.json - 8. VisorC: first skywire-visor with generic/visorC.json - 9. shell: new shell for interactive exploration -3. ENV-vars in shell-window: - 1. $MSG_PK, $SN_PK - public keys of dmsg-server and setup-node - 2. $PK_A, $PK_B, $PK_C - public keys of visor_A, visor_B, visor_C - 3. $RPC_A, $RPC_B, $RPC_C - `--rpc` param for ../skywire/skywire-cli - 4. $CHAT_A, $CHAT_B - addresses and ports for `skychat`-apps on visor_A and visor_C -4. Aliases in shell-window: `CLI_A`, `CLI_B`, `CLI_C` - -### Proxy test environment - -The proxy test environment will define the following: - -- skywire-services running on localhost -- 3 `skywire-visor`s: - - VisorA - running `proxy` app - - VsorB - intermediary visor without apps - - VisorC - running `proxy-client` app - -#### Preparation - -It's really tricky to make socks5 proxy work now from clean start. - -Because `skysocks-client` needs: -- transport to VisorA -- VisorA must be running **before** start of `skysocks-client` - -Recipe for clean start: - -1. Run `make integration-teardown` -2. Start `./integration/run-proxy-env.sh` -3. Run `make integration-startup` -4. Stop VisorA, VisorB, VisorC -5. Restart all visors -6. Wait for message in VisorC logs about successful start of -skysocks-client -7. Check `lsof -i :9999` that it's really started -8. Check `curl -v --retry 5 --retry-connrefused 1 --connect-timeout 5 -x socks5://123456:@localhost:9999 https://www.google.com` - - -#### Scenario. Proxy test #1 - -1. `./integration/run-proxy-env.sh` -2. In `shell` window run: `./integration/test-proxy.sh` -3. Examine `./logs/proxy` - -## Notes & recipes - -### Delays - -It's possible that a service could start earlier or later than needed. - -Examine windows, in case of failed service - restart it (E.g. `KeyUp`-`Enter`) - -### Tmux for new users - -1. Read `man tmux` -2. Run `tmux list-keys` -3. Find your `send-prefix` key: `tmux list-keys | grep send-prefix` -4. Use this prefix for switching between windows - -### Guidelines for new test creation - -1. **Decide**: - - new test is new scenario in existing environments - - or new environment with new scenario -2. If existing environment is sufficient: - - create new script in `./integration` with name `test-[name of test].sh` - - use existing `./integration/run*.sh` for inspiration - - add section describing this scenario in this document -3. In case of need in special environment: - - `cp -r ./integration/generic ./integration/[new environment]` - - `cp ./integraton/run-generic-env.sh ./integration/run-[new environment].sh` - - modify whats needed - - add section describing new environment and scenario(s) in this document diff --git a/integration/check-route-finder.sh b/integration/check-route-finder.sh deleted file mode 100644 index 094b2080d1..0000000000 --- a/integration/check-route-finder.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo -e "\n\n" ROUTE-FINDER "\n\n" - -echo -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' |curl -X GET $RF/routes -d@- -echo -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_B'","min_hops":0, "max_hops":50}' -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_B'","min_hops":0, "max_hops":50}' |curl -X GET $RF/routes -d@- -echo -echo '{"src_pk":''"'$PK_B'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' -echo '{"src_pk":''"'$PK_B'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' |curl -X GET $RF/routes -d@- diff --git a/integration/check-services.sh b/integration/check-services.sh deleted file mode 100644 index 42525296bf..0000000000 --- a/integration/check-services.sh +++ /dev/null @@ -1,43 +0,0 @@ - -echo -e "\n\n" DMSG-DISCOVERY - -echo -e "\n\n" $MSGD/dmsg-discovery/available_servers"\n" -curl $MSGD/dmsg-discovery/available_servers - -echo -e "\n\n" $MSGD/dmsg-discovery/entry/PK_A"\n" -curl $MSGD/dmsg-discovery/entry/$PK_A - -echo -e "\n\n" $MSGD/dmsg-discovery/entry/PK_B"\n" -curl $MSGD/dmsg-discovery/entry/$PK_B - -echo -e "\n\n" $MSGD/dmsg-discovery/entry/PK_C"\n" -curl $MSGD/dmsg-discovery/entry/$PK_C - - -echo -e "\n\n" TRANSPORT-DISCOVERY - -echo -e "\n\n" $TRD/security/nonces/PK_A"\n" -curl $TRD/security/nonces/$PK_A -echo -e "\n\n" $TRD/transports/edge:PK_A "\n" -curl $TRD/transports/edge:$PK_A - -echo -e "\n\n" $TRD/security/nonces/PK_B"\n" -curl $TRD/security/nonces/$PK_B -echo -e "\n\n" $TRD/transports/edge:PK_B "\n" -curl $TRD/transports/edge:$PK_B -echo -e "\n\n" $TRD/security/nonces/PK_C"\n" -curl $TRD/security/nonces/$PK_C -echo -e "\n\n" $TRD/transports/edge:PK_C "\n" -curl $TRD/transports/edge:$PK_C - -echo -e "\n\n" ROUTE-FINDER "\n\n" - -echo -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' |curl -X GET $RF/routes -d@- -echo -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_B'","min_hops":0, "max_hops":50}' -echo '{"src_pk":''"'$PK_A'","dst_pk":''"'$PK_B'","min_hops":0, "max_hops":50}' |curl -X GET $RF/routes -d@- -echo -echo '{"src_pk":''"'$PK_B'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' -echo '{"src_pk":''"'$PK_B'","dst_pk":''"'$PK_C'","min_hops":0, "max_hops":50}' |curl -X GET $RF/routes -d@- diff --git a/integration/generic/env-vars.sh b/integration/generic/env-vars.sh deleted file mode 100644 index 0582817b49..0000000000 --- a/integration/generic/env-vars.sh +++ /dev/null @@ -1,26 +0,0 @@ -# This script needs to be `source`d from bash-compatible shell -# E.g. `source ./integration/generic/env-vars.sh` or `. ./integration/generic/env-vars.sh` -export PK_A=$(jq -r ".visor.static_public_key" ./integration/generic/visorA.json) -export RPC_A=$(jq -r ".interfaces.rpc" ./integration/generic/visorA.json) -export PK_B=$(jq -r ".visor.static_public_key" ./integration/intermediary-visorB.json) -export RPC_B=$(jq -r ".interfaces.rpc" ./integration/intermediary-visorB.json) -export PK_C=$(jq -r ".visor.static_public_key" ./integration/generic/visorC.json) -export RPC_C=$(jq -r ".interfaces.rpc" ./integration/generic/visorC.json) - -export CHAT_A=http://localhost:8000/message -export CHAT_C=http://localhost$(jq -r '.apps [] |select(.app=="skychat")| .args[1] ' ./integration/generic/visorC.json)/message - -alias CLI_A='./skywire-cli --rpc $RPC_A' -alias CLI_B='./skywire-cli --rpc $RPC_B' -alias CLI_C='./skywire-cli --rpc $RPC_C' - -export MSGD=https://dmsg.discovery.skywire.skycoin.com -export TRD=https://transport.discovery.skywire.skycoin.com -export RF=https://routefinder.skywire.skycoin.com - -echo PK_A: $PK_A -echo PK_B: $PK_B -echo PK_C: $PK_C - -echo CHAT_A: $CHAT_A -echo CHAT_C: $CHAT_C diff --git a/integration/generic/visorA.json b/integration/generic/visorA.json deleted file mode 100644 index 7f8da7c0c5..0000000000 --- a/integration/generic/visorA.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "version": "1.0", - "visor": { - "static_public_key": "02072dd1e2ccd761e717096e1a264de1d8917e78e3176ca99dbf7ccf7292969845", - "static_secret_key": "7073e557aa2308b448525397ea2f45d56c9962c4dcdf82c5fdb5cc02fca0481c" - }, - "dmsg": { - "discovery": "https://dmsg.discovery.skywire.skycoin.com", - "sessions_count": 1 - }, - "transport": { - "discovery": "https://transport.discovery.skywire.skycoin.com", - "log_store": { - "type": "file", - "location": "./local/visorA/transport_logs" - } - }, - "routing": { - "setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" - ], - "route_finder": "https://routefinder.skywire.skycoin.com/" - }, - "apps": [ - { - "app": "skychat", - "version": "1.0", - "auto_start": true, - "port": 1, - "args": [] - }, - { - "app": "skysocks", - "version": "1.0", - "auto_start": true, - "port": 3, - "args": [] - } - ], - "trusted_visors": [], - "hypervisors": [], - "apps_path": "./apps", - "local_path": "./local/visorA", - "log_level": "info", - "interfaces": { - "rpc": "localhost:3436" - } -} diff --git a/integration/generic/visorC.json b/integration/generic/visorC.json deleted file mode 100644 index 513b2099b4..0000000000 --- a/integration/generic/visorC.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "version": "1.0", - "visor": { - "static_public_key": "02c9ddf5c2ae6a5a2166028dafbc814eff3ec2352f429fb0aa37d96e1aa668f332", - "static_secret_key": "5ab3744ab56e4d0b82f9a915e07b8f05d51ec0f16ff8496bd92f4e378ca6c1fc" - }, - "dmsg": { - "discovery": "https://dmsg.discovery.skywire.skycoin.com", - "sessions_count": 1 - }, - "transport": { - "discovery": "https://transport.discovery.skywire.skycoin.com", - "log_store": { - "type": "file", - "location": "./local/visorC/transport_logs" - } - }, - "routing": { - "setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" - ], - "route_finder": "https://routefinder.skywire.skycoin.com/" - }, - "apps": [ - { - "app": "skychat", - "version": "1.0", - "auto_start": true, - "port": 1, - "args": [ - "-addr", - ":8001" - ] - }, - { - "app": "skysocks-client", - "version": "1.0", - "auto_start": true, - "port": 13, - "args": [ - "-srv", - "024ec47420176680816e0406250e7156465e4531f5b26057c9f6297bb0303558c7" - ] - } - ], - "trusted_visors": [], - "hypervisors": [], - "apps_path": "./apps", - "local_path": "./local/visorC", - "log_level": "info", - "interfaces": { - "rpc": "localhost:3438" - } -} diff --git a/integration/intermediary-visorB.json b/integration/intermediary-visorB.json deleted file mode 100644 index 4f1ef43dd5..0000000000 --- a/integration/intermediary-visorB.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "version": "1.0", - "visor": { - "static_public_key": "0372ee0a2b99b55906ac33b49704073ab90ab4f395d814d48d597b5b42c39e5c79", - "static_secret_key": "5092f14fe18bd7dcd34479c5d26bb3bf68b708ec74a12c4557091e82dd6e6c36" - }, - "dmsg": { - "discovery": "https://dmsg.discovery.skywire.skycoin.com", - "sessions_count": 1 - }, - "transport": { - "discovery": "https://transport.discovery.skywire.skycoin.com", - "log_store": { - "type": "file", - "location": "./local/visorB/transport_logs" - } - }, - "routing": { - "setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" - ], - "route_finder": "https://routefinder.skywire.skycoin.com/", - "route_finder_timeout": "60s" - }, - "apps": [], - "trusted_visors": [], - "hypervisors": [], - "apps_path": "./bin/apps", - "local_path": "./local/localB", - "log_level": "info", - "interfaces": { - "rpc": "localhost:3435" - } -} diff --git a/integration/messaging/env-vars.sh b/integration/messaging/env-vars.sh deleted file mode 100644 index 67580ddcf5..0000000000 --- a/integration/messaging/env-vars.sh +++ /dev/null @@ -1,30 +0,0 @@ -# This script needs to be `source`d from bash-compatible shell -# E.g. `source ./integration/generic/env-vars.sh` or `. ./integration/messaging/env-vars.sh` -export PK_A=$(jq -r ".visor.static_public_key" ./integration/messaging/visorA.json) -export RPC_A=$(jq -r ".interfaces.rpc" ./integration/messaging/visorA.json) -export PK_B=$(jq -r ".visor.static_public_key" ./integration/intermediary-visorB.json) -export RPC_B=$(jq -r ".interfaces.rpc" ./integration/intermediary-visorB.json) -export PK_C=$(jq -r ".visor.static_public_key" ./integration/messaging/visorC.json) -export RPC_C=$(jq -r ".interfaces.rpc" ./integration/messaging/visorC.json) - -export CHAT_A=http://localhost:8000/message -export CHAT_C=http://localhost$(jq -r '.apps [] |select(.app=="skychat")| .args[1] ' ./integration/messaging/visorC.json)/message - -export MSGD=https://dmsg.discovery.skywire.skycoin.com -export TRD=https://transport.discovery.skywire.skycoin.com -export RF=https://routefinder.skywire.skycoin.com - -alias CLI_A='./skywire-cli --rpc $RPC_A' -alias CLI_B='./skywire-cli --rpc $RPC_B' -alias CLI_C='./skywire-cli --rpc $RPC_C' - -alias RUN_A='./skywire-visor ./integration/messaging/visorA.json --tag VisorA' -alias RUN_B='./skywire-visor ./integration/messaging/intermediary-visorB.json --tag VisorB' -alias RUN_C='./skywire-visor ./integration/messaging/visorC.json --tag VisorC' - -echo PK_A: $PK_A -echo PK_B: $PK_B -echo PK_C: $PK_C - -echo CHAT_A: $CHAT_A -echo CHAT_C: $CHAT_C diff --git a/integration/messaging/visorA.json b/integration/messaging/visorA.json deleted file mode 100644 index 22a9bf6df6..0000000000 --- a/integration/messaging/visorA.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "version": "1.0", - "visor": { - "static_public_key": "02072dd1e2ccd761e717096e1a264de1d8917e78e3176ca99dbf7ccf7292969845", - "static_secret_key": "7073e557aa2308b448525397ea2f45d56c9962c4dcdf82c5fdb5cc02fca0481c" - }, - "dmsg": { - "discovery": "https://dmsg.discovery.skywire.skycoin.com", - "sessions_count": 1 - }, - "transport": { - "discovery": "https://transport.discovery.skywire.skycoin.com", - "log_store": { - "type": "file", - "location": "./local/visorA/transport_logs" - } - }, - "routing": { - "setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" - ], - "route_finder": "https://routefinder.skywire.skycoin.com/", - "route_finder_timeout": "60s" - }, - "apps": [ - { - "app": "skychat", - "version": "1.0", - "auto_start": true, - "port": 1, - "args": [] - } - ], - "trusted_visors": [], - "hypervisors": [], - "apps_path": "./apps", - "shutdown_timeout": "30s", - "local_path": "./local/visorA", - "log_level": "info", - "interfaces": { - "rpc": "localhost:3436" - } -} diff --git a/integration/messaging/visorC.json b/integration/messaging/visorC.json deleted file mode 100644 index e87a963b7c..0000000000 --- a/integration/messaging/visorC.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": "1.0", - "visor": { - "static_public_key": "02c9ddf5c2ae6a5a2166028dafbc814eff3ec2352f429fb0aa37d96e1aa668f332", - "static_secret_key": "5ab3744ab56e4d0b82f9a915e07b8f05d51ec0f16ff8496bd92f4e378ca6c1fc" - }, - "dmsg": { - "discovery": "https://dmsg.discovery.skywire.skycoin.com", - "sessions_count": 1 - }, - "transport": { - "discovery": "https://transport.discovery.skywire.skycoin.com", - "log_store": { - "type": "file", - "location": "./local/visorC/transport_logs" - } - }, - "routing": { - "setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" - ], - "route_finder": "https://routefinder.skywire.skycoin.com/", - "route_finder_timeout": "60s" - }, - "apps": [ - { - "app": "skychat", - "version": "1.0", - "auto_start": true, - "port": 1, - "args": [ - "-addr", - ":8001" - ] - } - ], - "trusted_visors": [], - "hypervisors": [], - "apps_path": "./apps", - "shutdown_timeout": "30s", - "local_path": "./local/visorC", - "log_level": "info", - "interfaces": { - "rpc": "localhost:3438" - } -} diff --git a/integration/proxy/env-vars.sh b/integration/proxy/env-vars.sh deleted file mode 100644 index 05fb0f29ec..0000000000 --- a/integration/proxy/env-vars.sh +++ /dev/null @@ -1,24 +0,0 @@ -# This script needs to be `source`d from bash-compatible shell -# E.g. `source ./integration/proxy/env-vars.sh` or `. ./integration/proxy/env-vars.sh` -export PK_A=$(jq -r ".visor.static_public_key" ./integration/proxy/visorA.json) -export RPC_A=$(jq -r ".interfaces.rpc" ./integration/proxy/visorA.json) -export PK_B=$(jq -r ".visor.static_public_key" ./integration/intermediary-visorB.json) -export RPC_B=$(jq -r ".interfaces.rpc" ./integration/intermediary-visorB.json) -export PK_C=$(jq -r ".visor.static_public_key" ./integration/proxy/visorC.json) -export RPC_C=$(jq -r ".interfaces.rpc" ./integration/proxy/visorC.json) - -alias CLI_A='./skywire-cli --rpc $RPC_A' -alias CLI_B='./skywire-cli --rpc $RPC_B' -alias CLI_C='./skywire-cli --rpc $RPC_C' - -export MSGD=https://dmsg.discovery.skywire.skycoin.com -export TRD=https://transport.discovery.skywire.skycoin.com -export RF=https://routefinder.skywire.skycoin.com - -alias RUN_A='go run ./cmd/skywire-visor ./integration/messaging/visorA.json --tag VisorA' -alias RUN_B='go run ./cmd/skywire-visor ./integration/intermediary-visorB.json --tag VisorB' -alias RUN_C='go run ./cmd/skywire-visor ./integration/messaging/visorC.json --tag VisorC' - -echo PK_A: $PK_A -echo PK_B: $PK_B -echo PK_C: $PK_C diff --git a/integration/proxy/visorA.json b/integration/proxy/visorA.json deleted file mode 100644 index b02610ec15..0000000000 --- a/integration/proxy/visorA.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "1.0", - "visor": { - "static_public_key": "02072dd1e2ccd761e717096e1a264de1d8917e78e3176ca99dbf7ccf7292969845", - "static_secret_key": "7073e557aa2308b448525397ea2f45d56c9962c4dcdf82c5fdb5cc02fca0481c" - }, - "dmsg": { - "discovery": "https://dmsg.discovery.skywire.skycoin.com", - "sessions_count": 1 - }, - "transport": { - "discovery": "https://transport.discovery.skywire.skycoin.com", - "log_store": { - "type": "file", - "location": "./local/visorA/transport_logs" - } - }, - "routing": { - "setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" - ], - "route_finder": "https://routefinder.skywire.skycoin.com/" - }, - "apps": [ - { - "app": "skysocks", - "version": "1.0", - "auto_start": true, - "port": 3, - "args": [] - } - ], - "trusted_visors": [], - "hypervisors": [], - "apps_path": "./apps", - "local_path": "./local/visorA", - "log_level": "info", - "interfaces": { - "rpc": "localhost:3436" - } -} diff --git a/integration/proxy/visorC.json b/integration/proxy/visorC.json deleted file mode 100644 index 19895f11ee..0000000000 --- a/integration/proxy/visorC.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "version": "1.0", - "visor": { - "static_public_key": "02c9ddf5c2ae6a5a2166028dafbc814eff3ec2352f429fb0aa37d96e1aa668f332", - "static_secret_key": "5ab3744ab56e4d0b82f9a915e07b8f05d51ec0f16ff8496bd92f4e378ca6c1fc" - }, - "dmsg": { - "discovery": "https://dmsg.discovery.skywire.skycoin.com", - "sessions_count": 1 - }, - "transport": { - "discovery": "https://transport.discovery.skywire.skycoin.com", - "log_store": { - "type": "file", - "location": "./local/visorC/transport_logs" - } - }, - "routing": { - "setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" - ], - "route_finder": "https://routefinder.skywire.skycoin.com/" - }, - "apps": [ - { - "app": "skysocks-client", - "version": "1.0", - "auto_start": true, - "port": 13, - "args": [ - "-srv", - "024ec47420176680816e0406250e7156465e4531f5b26057c9f6297bb0303558c7" - ] - } - ], - "trusted_visors": [], - "hypervisors": [], - "apps_path": "./apps", - "local_path": "./local/visorC", - "log_level": "info", - "interfaces": { - "rpc": "localhost:3438" - } -} diff --git a/integration/run-generic-env.sh b/integration/run-generic-env.sh deleted file mode 100644 index e308c2784d..0000000000 --- a/integration/run-generic-env.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -## SKYWIRE - -tmux new -s skywire -d - -source ./integration/generic/env-vars.sh - -echo "Checking transport-discovery is up" -curl --retry 5 --retry-connrefused 1 --connect-timeout 5 https://transport.discovery.skywire.skycoin.net/security/nonces/$PK_A - -tmux rename-window -t skywire VisorA -tmux send-keys -t VisorA -l "./skywire-visor ./integration/generic/visorA.json --tag VisorA $SYSLOG_OPTS" -tmux send-keys C-m -tmux new-window -t skywire -n VisorB -tmux send-keys -t VisorB -l "./skywire-visor ./integration/intermediary-visorB.json --tag VisorB $SYSLOG_OPTS" -tmux send-keys C-m -tmux new-window -t skywire -n VisorC -tmux send-keys -t VisorC -l "./skywire-visor ./integration/generic/visorC.json --tag VisorC $SYSLOG_OPTS" -tmux send-keys C-m - -tmux new-window -t skywire -n shell - -tmux send-keys -t shell 'source ./integration/generic/env-vars.sh' C-m - -tmux attach -t skywire diff --git a/integration/run-messaging-env.sh b/integration/run-messaging-env.sh deleted file mode 100644 index 85f7773109..0000000000 --- a/integration/run-messaging-env.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -## SKYWIRE - -tmux new -s skywire -d - -source ./integration/messaging/env-vars.sh - -echo "Checking transport-discovery is up" -curl --retry 5 --retry-connrefused 1 --connect-timeout 5 https://transport.discovery.skywire.skycoin.net/security/nonces/$PK_A - -tmux rename-window -t skywire VisorA -tmux send-keys -t VisorA -l "./skywire-visor ./integration/messaging/visorA.json --tag VisorA $SYSLOG_OPTS" -tmux send-keys C-m -tmux new-window -t skywire -n VisorB -tmux send-keys -t VisorB -l "./skywire-visor ./integration/intermediary-visorB.json --tag VisorB $SYSLOG_OPTS" -tmux send-keys C-m -tmux new-window -t skywire -n VisorC -tmux send-keys -t VisorC -l "./skywire-visor ./integration/messaging/visorC.json --tag VisorC $SYSLOG_OPTS" -tmux send-keys C-m - -tmux new-window -t skywire -n shell - -tmux send-keys -t shell 'source ./integration/messaging/env-vars.sh' C-m - -tmux attach -t skywire diff --git a/integration/run-proxy-env.sh b/integration/run-proxy-env.sh deleted file mode 100644 index 481740f359..0000000000 --- a/integration/run-proxy-env.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -## SKYWIRE - -tmux new -s skywire -d - -source ./integration/proxy/env-vars.sh - -echo "Checking transport-discovery is up" -curl --retry 5 --retry-connrefused 1 --connect-timeout 5 https://transport.discovery.skywire.skycoin.net/security/nonces/$PK_A - -tmux rename-window -t skywire VisorA -tmux send-keys -t VisorA -l "./skywire-visor ./integration/proxy/visorA.json --tag VisorA $SYSLOG_OPTS" -tmux send-keys C-m -tmux new-window -t skywire -n VisorB -tmux send-keys -t VisorB -l "./skywire-visor ./integration/intermediary-visorB.json --tag VisorB $SYSLOG_OPTS" -tmux send-keys C-m -tmux new-window -t skywire -n VisorC -tmux send-keys -t VisorC -l "./skywire-visor ./integration/proxy/visorC.json --tag VisorC $SYSLOG_OPTS" -tmux send-keys C-m - -tmux new-window -t skywire -n shell - -tmux send-keys -t shell 'source ./integration/proxy/env-vars.sh' C-m - -tmux attach -t skywire diff --git a/integration/start-restart-nodeB.sh b/integration/start-restart-nodeB.sh deleted file mode 100644 index f2fff19e3b..0000000000 --- a/integration/start-restart-nodeB.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -mkdir -p ./logs -echo Press Ctrl-C to exit -for ((;;)) -do - ./bin/skywire-visor ./integration/intermediary-visorB.json --tag VisorB 2>> ./logs/visorB.log >> ./logs/visorB.log & - echo visor starting VisorB - sleep 25 - echo Killing VisorB on $(ps aux |grep "[V]isorB" |awk '{print $2}') - kill $(ps aux |grep "[V]isorB" |awk '{print $2}') - sleep 3 - echo Restarting VisorB -done diff --git a/integration/startup.sh b/integration/startup.sh deleted file mode 100644 index 86e9ad2aeb..0000000000 --- a/integration/startup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# Use this script: -# - inside tmux session created by run-*-env.sh scripts -# - or standalone `source ./integration/[name of environment]/env-vars.sh && ./integration/startup.sh` - -./skywire-cli --rpc $RPC_A visor add-tp $PK_B -./skywire-cli --rpc $RPC_C visor add-tp $PK_B -sleep 1 - -echo "VisorA Transports:" -./skywire-cli --rpc $RPC_A visor ls-tp - -echo "VisorB Transports:" -./skywire-cli --rpc $RPC_B visor ls-tp diff --git a/integration/tear-down.sh b/integration/tear-down.sh deleted file mode 100755 index 72dbdf8150..0000000000 --- a/integration/tear-down.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# In case skywire-visors are not stopped properly. -kill $(ps aux |grep "[N]odeA" |awk '{print $2}') -kill $(ps aux |grep "[N]odeB" |awk '{print $2}') -kill $(ps aux |grep "[N]odeC" |awk '{print $2}') - -echo Removing ./local -rm -rf ./local diff --git a/integration/test-messaging-loop.sh b/integration/test-messaging-loop.sh deleted file mode 100644 index 97223bde10..0000000000 --- a/integration/test-messaging-loop.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -source ./integration/generic/env-vars.sh -echo "Press Ctrl-C to exit" -for ((;;)) -do - curl --data {'"recipient":"'$PK_A'", "message":"Hello Joe!"}' -X POST $CHAT_C - curl --data {'"recipient":"'$PK_C'", "message":"Hello Mike!"}' -X POST $CHAT_A -done diff --git a/integration/test-messaging.sh b/integration/test-messaging.sh deleted file mode 100644 index 6a5add8b75..0000000000 --- a/integration/test-messaging.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -curl --data {'"recipient":"'$PK_A'", "message":"Hello Joe!"}' -X POST $CHAT_C -curl --data {'"recipient":"'$PK_C'", "message":"Hello Mike!"}' -X POST $CHAT_A diff --git a/vendor/modules.txt b/vendor/modules.txt index 2692f7638a..e8d2194c7c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/SkycoinProject/dmsg v0.0.0-20200224064625-1b539081519c +# github.com/SkycoinProject/dmsg v0.0.0-20200225140132-2d14296245d5 github.com/SkycoinProject/dmsg github.com/SkycoinProject/dmsg/cipher github.com/SkycoinProject/dmsg/disc