@@ -113,18 +113,24 @@ describe('#deploy-cloudrun', function () {
113113 await run ( ) ;
114114 expect ( this . stubs . setFailed . callCount ) . to . be . at . least ( 1 ) ;
115115 } ) ;
116- it ( 'installs beta components with source ' , async function ( ) {
116+ it ( 'sets source if given ' , async function ( ) {
117117 this . stubs . getInput . withArgs ( 'source' ) . returns ( 'example-app' ) ;
118118 this . stubs . getInput . withArgs ( 'image' ) . returns ( '' ) ;
119119 await run ( ) ;
120- expect ( this . stubs . installComponent . withArgs ( 'beta' ) . callCount ) . to . eq ( 1 ) ;
120+ const call = this . stubs . getExecOutput . getCall ( 0 ) ;
121+ expect ( call ) . to . be ;
122+ const args = call . args [ 1 ] ;
123+ expect ( args ) . to . include . members ( [ '--source' , 'example-app' ] ) ;
121124 } ) ;
122- it ( 'installs beta components with metadata ' , async function ( ) {
125+ it ( 'sets metadata if given ' , async function ( ) {
123126 this . stubs . getInput . withArgs ( 'metadata' ) . returns ( 'yaml' ) ;
124127 this . stubs . getInput . withArgs ( 'image' ) . returns ( '' ) ;
125128 this . stubs . getInput . withArgs ( 'service' ) . returns ( '' ) ;
126129 await run ( ) ;
127- expect ( this . stubs . installComponent . withArgs ( 'beta' ) . callCount ) . to . eq ( 1 ) ;
130+ const call = this . stubs . getExecOutput . getCall ( 0 ) ;
131+ expect ( call ) . to . be ;
132+ const args = call . args [ 1 ] ;
133+ expect ( args ) . to . include . members ( [ 'services' , 'replace' , 'yaml' ] ) ;
128134 } ) ;
129135 it ( 'sets timeout if given' , async function ( ) {
130136 this . stubs . getInput . withArgs ( 'timeout' ) . returns ( '55m12s' ) ;
@@ -134,16 +140,22 @@ describe('#deploy-cloudrun', function () {
134140 const args = call . args [ 1 ] ;
135141 expect ( args ) . to . include . members ( [ '--timeout' , '55m12s' ] ) ;
136142 } ) ;
137- it ( 'installs beta components with tag ' , async function ( ) {
143+ it ( 'sets tag if given ' , async function ( ) {
138144 this . stubs . getInput . withArgs ( 'tag' ) . returns ( 'test' ) ;
139145 await run ( ) ;
140- expect ( this . stubs . installComponent . withArgs ( 'beta' ) . callCount ) . to . eq ( 1 ) ;
146+ const call = this . stubs . getExecOutput . getCall ( 0 ) ;
147+ expect ( call ) . to . be ;
148+ const args = call . args [ 1 ] ;
149+ expect ( args ) . to . include . members ( [ '--tag' , 'test' ] ) ;
141150 } ) ;
142- it ( 'installs beta components with tag traffic' , async function ( ) {
151+ it ( 'sets tag traffic if given ' , async function ( ) {
143152 this . stubs . getInput . withArgs ( 'tag' ) . returns ( 'test' ) ;
144153 this . stubs . getInput . withArgs ( 'name' ) . returns ( 'service-name' ) ;
145154 await run ( ) ;
146- expect ( this . stubs . installComponent . withArgs ( 'beta' ) . callCount ) . to . eq ( 1 ) ;
155+ const call = this . stubs . getExecOutput . getCall ( 0 ) ;
156+ expect ( call ) . to . be ;
157+ const args = call . args [ 1 ] ;
158+ expect ( args ) . to . include . members ( [ '--tag' , 'test' ] ) ;
147159 } ) ;
148160 it ( 'fails if tag traffic and revision traffic are provided' , async function ( ) {
149161 this . stubs . getInput . withArgs ( 'revision_traffic' ) . returns ( 'TEST=100' ) ;
0 commit comments