@@ -1698,10 +1698,9 @@ describe('database provisioning', () => {
16981698
16991699 const { spinner } = await runProvisionTest ( config , flags )
17001700
1701- expect ( spinner . info ) . toHaveBeenCalledWith ( expect . stringContaining ( 'No region is configured for the database, deploying in default region amer' ) )
1702- expect ( spinner . start ) . toHaveBeenCalledWith ( 'Deploying database for region \'amer\'' )
1703- expect ( command . config . runCommand ) . toHaveBeenCalledWith ( 'app:db:provision' , [ '--region' , 'amer' , '--yes' ] )
1704- expect ( spinner . succeed ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Deployed database for application in region \'amer\'' ) )
1701+ expect ( spinner . start ) . toHaveBeenCalledWith ( 'Deploying database in default region' )
1702+ expect ( command . config . runCommand ) . toHaveBeenCalledWith ( 'app:db:provision' , [ '--yes' ] )
1703+ expect ( spinner . succeed ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Deployed database for application' ) )
17051704 } )
17061705
17071706 test ( 'should use configured region when specified in manifest' , async ( ) => {
@@ -1710,8 +1709,7 @@ describe('database provisioning', () => {
17101709
17111710 const { spinner } = await runProvisionTest ( config , flags )
17121711
1713- expect ( spinner . info ) . not . toHaveBeenCalledWith ( expect . stringContaining ( 'No region is configured for the database' ) )
1714- expect ( spinner . start ) . toHaveBeenCalledWith ( 'Deploying database for region \'emea\'' )
1712+ expect ( spinner . start ) . toHaveBeenCalledWith ( 'Deploying database in region \'emea\'' )
17151713 expect ( command . config . runCommand ) . toHaveBeenCalledWith ( 'app:db:provision' , [ '--region' , 'emea' , '--yes' ] )
17161714 expect ( spinner . succeed ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Deployed database for application in region \'emea\'' ) )
17171715 } )
@@ -1723,11 +1721,21 @@ describe('database provisioning', () => {
17231721 const { spinner } = await runProvisionTest ( config , flags )
17241722
17251723 expect ( spinner . info ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Running: aio app db provision --region amer --yes' ) )
1726- expect ( spinner . info ) . not . toHaveBeenCalledWith ( expect . stringContaining ( 'No region is configured for the database' ) )
17271724 expect ( spinner . start ) . toHaveBeenCalledTimes ( 2 ) // Once initially, once after verbose info
17281725 expect ( spinner . succeed ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Deployed database for application in region \'amer\'' ) )
17291726 } )
17301727
1728+ test ( 'should show verbose output without region when no region configured' , async ( ) => {
1729+ const config = createDatabaseConfig ( )
1730+ const flags = { verbose : true }
1731+
1732+ const { spinner } = await runProvisionTest ( config , flags )
1733+
1734+ expect ( spinner . info ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Running: aio app db provision --yes' ) )
1735+ expect ( spinner . start ) . toHaveBeenCalledTimes ( 2 ) // Once initially, once after verbose info
1736+ expect ( spinner . succeed ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Deployed database for application' ) )
1737+ } )
1738+
17311739 test ( 'should handle provision command failure' , async ( ) => {
17321740 const config = createDatabaseConfig ( 'amer' )
17331741 const flags = { verbose : false }
0 commit comments