Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
test: put all the local testing snippets into single file
Browse files Browse the repository at this point in the history
  • Loading branch information
axb-topos committed Aug 10, 2022
1 parent cbc56f9 commit 7814d62
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 69 deletions.
2 changes: 0 additions & 2 deletions scripts/api_curl.sh

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/cert1.json

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/cert2.json

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/cert3.json

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/cert_post.json

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/kad_test_launches.sh

This file was deleted.

57 changes: 57 additions & 0 deletions scripts/local_test_launches_snippets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

#
# deep but not obtrusive logging
#
export RUST_LOG="debug,libp2p=warn"

#
# 5 nodes - boot node + 4 peers
#

# 12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X /ip4/127.0.0.1/tcp/30001
cargo run -- --local-key-seed 1 --tce-local-port 30001 --web-api-local-port 8011

# 12D3KooWH3uVF6wv47WnArKHk5p6cvgCJEb74UTmxztmQDc298L3 /ip4/127.0.0.1/tcp/30002
cargo run -- --local-key-seed 2 --tce-local-port 30002 --web-api-local-port 8012 --boot-peers "12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X /dns4/localhost/tcp/30001"

# 12D3KooWQYhTNQdmr3ArTeUHRYzFg94BKyTkoWBDWez9kSCVe2Xo /ip4/127.0.0.1/tcp/30003
cargo run -- --local-key-seed 3 --tce-local-port 30003 --web-api-local-port 8013 --boot-peers "12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X /ip4/127.0.0.1/tcp/30001"

# 12D3KooWLJtG8fd2hkQzTn96MrLvThmnNQjTUFZwGEsLRz5EmSzc /ip4/127.0.0.1/tcp/30004
cargo run -- --local-key-seed 4 --tce-local-port 30004 --web-api-local-port 8014 --boot-peers "12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X /ip4/127.0.0.1/tcp/30001"

# 12D3KooWSHj3RRbBjD15g6wekV8y3mm57Pobmps2g2WJm6F67Lay /ip4/127.0.0.1/tcp/30005
cargo run -- --local-key-seed 5 --tce-local-port 30005 --web-api-local-port 8015 --boot-peers "12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X /ip4/127.0.0.1/tcp/30001"

#
# posting 3 certificates (to the second peer)
#
curl -X POST http://localhost:8012/certs -H "Content-Type: application/json" -d '{
"cert" : {
"id": 1,
"prev_cert_id": 0,
"initial_subnet_id": 100,
"calls": []
}
}
'

curl -X POST http://localhost:8012/certs -H "Content-Type: application/json" -d '{
"cert" : {
"id": 2,
"prev_cert_id": 1,
"initial_subnet_id": 100,
"calls": []
}
}
'

curl -X POST http://localhost:8012/certs -H "Content-Type: application/json" -d '{
"cert" : {
"id": 3,
"prev_cert_id": 2,
"initial_subnet_id": 100,
"calls": []
}
}
'
15 changes: 0 additions & 15 deletions scripts/post_3_certs.sh

This file was deleted.

0 comments on commit 7814d62

Please sign in to comment.