File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,23 @@ describe("CLI commands", () => {
337337 expect ( r . stdout ) . toMatch ( / - - a p i - k e y / ) ;
338338 } ) ;
339339
340+ test ( "cli: mon local-install --api-key and --db-url skip interactive prompts" , ( ) => {
341+ // This test verifies that when --api-key and --db-url are provided,
342+ // the CLI uses them directly without prompting for input.
343+ // The command will fail later (no Docker, invalid DB), but we check
344+ // that the options were parsed and used correctly.
345+ const r = runCli ( [
346+ "mon" , "local-install" ,
347+ "--api-key" , "test-api-key-12345" ,
348+ "--db-url" , "postgresql://user:pass@localhost:5432/testdb"
349+ ] ) ;
350+
351+ // Should show that API key was provided via CLI option (not prompting)
352+ expect ( r . stdout ) . toMatch ( / U s i n g A P I k e y p r o v i d e d v i a - - a p i - k e y p a r a m e t e r / ) ;
353+ // Should show that DB URL was provided via CLI option (not prompting)
354+ expect ( r . stdout ) . toMatch ( / U s i n g d a t a b a s e U R L p r o v i d e d v i a - - d b - u r l p a r a m e t e r / ) ;
355+ } ) ;
356+
340357 test ( "cli: auth login --help shows --set-key option" , ( ) => {
341358 const r = runCli ( [ "auth" , "login" , "--help" ] ) ;
342359 expect ( r . status ) . toBe ( 0 ) ;
You can’t perform that action at this time.
0 commit comments