Skip to content

Commit

Permalink
[tools/shoestring]: address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayonb committed Nov 27, 2024
1 parent 7c731cb commit 9cb0eb5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions tools/shoestring/shoestring/lang/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ msgid "argument-help-ca-key-path"
msgstr "path to main private key PEM file"

#: shoestring/commands/announce_transaction.py:35
#: shoestring/commands/health.py:74 shoestring/commands/import_bootstrap.py:41
#: shoestring/commands/health.py:74 shoestring/commands/import_bootstrap.py:42
#: shoestring/commands/import_harvesters.py:97 shoestring/commands/init.py:29
#: shoestring/commands/min_cosignatures_count.py:34
#: shoestring/commands/renew_certificates.py:34
Expand All @@ -43,11 +43,11 @@ msgstr "path to shoestring configuration file"
msgid "argument-help-directory"
msgstr "installation directory (default: {default_path})"

#: shoestring/commands/import_bootstrap.py:42
#: shoestring/commands/import_bootstrap.py:43
msgid "argument-help-import-bootstrap-bootstrap"
msgstr "path to bootstrap target directory"

#: shoestring/commands/import_bootstrap.py:43
#: shoestring/commands/import_bootstrap.py:44
msgid "argument-help-import-bootstrap-node-key"
msgstr "import node key"

Expand Down Expand Up @@ -264,7 +264,7 @@ msgstr "importing node key from bootstrap ({path})"

#: shoestring/commands/import_bootstrap.py:33
msgid "import-bootstrap-importing-node-key-not-found"
msgstr "importing node key from bootstrap failed. File not found ({path})"
msgstr "importing node key from bootstrap failed. File not found ({path})"

#: shoestring/commands/import_bootstrap.py:24
msgid "import-bootstrap-importing-voter"
Expand Down
6 changes: 3 additions & 3 deletions tools/shoestring/shoestring/lang/ja/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ msgid "argument-help-ca-key-path"
msgstr ""

#: shoestring/commands/announce_transaction.py:35
#: shoestring/commands/health.py:74 shoestring/commands/import_bootstrap.py:41
#: shoestring/commands/health.py:74 shoestring/commands/import_bootstrap.py:42
#: shoestring/commands/import_harvesters.py:97 shoestring/commands/init.py:29
#: shoestring/commands/min_cosignatures_count.py:34
#: shoestring/commands/renew_certificates.py:34
Expand All @@ -41,11 +41,11 @@ msgstr ""
msgid "argument-help-directory"
msgstr ""

#: shoestring/commands/import_bootstrap.py:42
#: shoestring/commands/import_bootstrap.py:43
msgid "argument-help-import-bootstrap-bootstrap"
msgstr ""

#: shoestring/commands/import_bootstrap.py:43
#: shoestring/commands/import_bootstrap.py:44
msgid "argument-help-import-bootstrap-node-key"
msgstr ""

Expand Down
6 changes: 3 additions & 3 deletions tools/shoestring/shoestring/lang/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ msgid "argument-help-ca-key-path"
msgstr ""

#: shoestring/commands/announce_transaction.py:35
#: shoestring/commands/health.py:74 shoestring/commands/import_bootstrap.py:41
#: shoestring/commands/health.py:74 shoestring/commands/import_bootstrap.py:42
#: shoestring/commands/import_harvesters.py:97 shoestring/commands/init.py:29
#: shoestring/commands/min_cosignatures_count.py:34
#: shoestring/commands/renew_certificates.py:34
Expand All @@ -34,11 +34,11 @@ msgstr ""
msgid "argument-help-directory"
msgstr ""

#: shoestring/commands/import_bootstrap.py:42
#: shoestring/commands/import_bootstrap.py:43
msgid "argument-help-import-bootstrap-bootstrap"
msgstr ""

#: shoestring/commands/import_bootstrap.py:43
#: shoestring/commands/import_bootstrap.py:44
msgid "argument-help-import-bootstrap-node-key"
msgstr ""

Expand Down
6 changes: 3 additions & 3 deletions tools/shoestring/tests/internal/test_NodeKeyProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_can_generates_node_key(self):
self.assertEqual(False, node_key_provider.is_imported)
self.assertEqual(True, node_key_filepath.exists())

def test_can_reuse_node_key(self):
def test_can_reuse_existing_node_key(self):
# Arrange:
with tempfile.TemporaryDirectory() as package_directory:
with CertificateFactory(self._create_executor(), Path(package_directory) / 'xyz.key.pem') as factory:
Expand Down Expand Up @@ -66,12 +66,12 @@ def _load_binary_file_data(filename):
renew_node_key_data = _load_binary_file_data(renew_node_key_filepath)
assert node_key_data == renew_node_key_data

def test_cannot_generates_node_key(self):
def test_cannot_generates_node_key_with_no_certificate_factory(self):
with self.assertRaises(RuntimeError):
node_key_provider = NodeKeyProvider(None)
node_key_provider.create_key_file(None)

def test_cannot_reuse_node_key(self):
def test_cannot_reuse_node_key_with_invalid_path(self):
with self.assertRaises(FileNotFoundError):
node_key_provider = NodeKeyProvider('/path/to/node/key/pem')
node_key_provider.create_key_file(None)
Expand Down

0 comments on commit 9cb0eb5

Please sign in to comment.