launch: the Access screen's help names --show-key and --api-key, so a person can see or set a key of their own (#3713 #3951); test
This commit is contained in:
1 parent
27cbbfe6d6
commit
aef053e353
2 files changed
+7
-1
No files matched your search
@@ -1328,7 +1328,8 @@ class AccessScreen(Base):
|
||||
step_id = "access"
|
||||
hints = "↑↓ choose Enter next p port k new key t key on/off Esc back ? help"
|
||||
help_text = ("Who can use the model. 'This computer only' is the safe default and never needs a key. Beyond it Strata makes an API key "
|
||||
"for you (recommended); press t if you would rather have no key: it still starts, but anyone who can reach it can use it.")
|
||||
"for you (recommended); press t if you would rather have no key: it still starts, but anyone who can reach it can use it. "
|
||||
"To see the key later: strata launch --show-key. To use a key of your own: strata launch --api-key YOUR-KEY (or --api-key-env NAME).")
|
||||
|
||||
BINDINGS = Base.BINDINGS + [Binding("p", "port", show=False), Binding("k", "newkey", show=False), Binding("t", "keytoggle", show=False)]
|
||||
|
||||
|
||||
@@ -952,6 +952,11 @@ class FlagsCommand(unittest.TestCase):
|
||||
self.assertIn("Nothing was changed.", out)
|
||||
self.assertEqual(store.list_presets(), [])
|
||||
|
||||
def test_the_access_help_names_the_flags_for_showing_and_setting_a_key(self): # #3713 #3951
|
||||
from strata_cli.launch import screens
|
||||
self.assertIn("strata launch --show-key", screens.AccessScreen.help_text)
|
||||
self.assertIn("--api-key YOUR-KEY", screens.AccessScreen.help_text)
|
||||
|
||||
def test_the_summary_says_where_the_engine_log_is(self): # #3656
|
||||
import tempfile
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
|
||||
Reference in new issue
Block a user