2019-01-12 04:32:59 +00:00
|
|
|
"""
|
|
|
|
This file is part of nucypher.
|
|
|
|
|
|
|
|
nucypher is free software: you can redistribute it and/or modify
|
2019-03-05 02:50:11 +00:00
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
2019-01-12 04:32:59 +00:00
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
nucypher is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2019-03-05 02:50:11 +00:00
|
|
|
GNU Affero General Public License for more details.
|
2019-01-12 04:32:59 +00:00
|
|
|
|
2019-03-05 02:50:11 +00:00
|
|
|
You should have received a copy of the GNU Affero General Public License
|
2019-01-12 04:32:59 +00:00
|
|
|
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
# WARNING This is not a mining script!
|
|
|
|
# you will not perform any re-encryptions, and you will not get paid.
|
|
|
|
# It might be (but might not be) useful for determining whether you have
|
|
|
|
# the proper dependencies and configuration to run an actual mining node.
|
|
|
|
|
|
|
|
|
2018-12-20 00:56:54 +00:00
|
|
|
from click.testing import CliRunner
|
|
|
|
|
2019-01-12 04:32:59 +00:00
|
|
|
from nucypher.cli.main import nucypher_cli
|
2020-05-20 04:56:08 +00:00
|
|
|
from nucypher.exceptions import DevelopmentInstallationRequired
|
|
|
|
|
|
|
|
try:
|
2020-05-20 19:36:21 +00:00
|
|
|
from tests.utils.ursula import select_test_port
|
2020-05-20 04:56:08 +00:00
|
|
|
except ImportError:
|
|
|
|
raise DevelopmentInstallationRequired(importable_name='tests.utils.ursula.select_test_port')
|
2018-12-20 00:56:54 +00:00
|
|
|
|
|
|
|
click_runner = CliRunner()
|
|
|
|
|
2019-01-12 04:32:59 +00:00
|
|
|
DEMO_NODE_PORT = select_test_port()
|
2019-06-01 14:03:36 +00:00
|
|
|
DEMO_FLEET_STARTING_PORT = 11500
|
2018-12-20 00:56:54 +00:00
|
|
|
|
2019-07-30 23:50:46 +00:00
|
|
|
args = ['ursula', 'run',
|
|
|
|
'--debug',
|
2019-01-12 04:32:59 +00:00
|
|
|
'--federated-only',
|
2019-07-25 04:26:20 +00:00
|
|
|
'--teacher', f'https://127.0.0.1:{DEMO_FLEET_STARTING_PORT}',
|
2019-01-12 04:32:59 +00:00
|
|
|
'--rest-port', DEMO_NODE_PORT,
|
2019-02-26 17:25:07 +00:00
|
|
|
'--dev'
|
2019-01-12 04:32:59 +00:00
|
|
|
]
|
2018-12-20 00:56:54 +00:00
|
|
|
|
2019-01-12 04:32:59 +00:00
|
|
|
nucypher_cli.main(args=args, prog_name="nucypher-cli")
|