@@ -113,18 +113,24 @@ describe('#deploy-cloudrun', function () {
113
113
await run ( ) ;
114
114
expect ( this . stubs . setFailed . callCount ) . to . be . at . least ( 1 ) ;
115
115
} ) ;
116
- it ( 'installs beta components with source ' , async function ( ) {
116
+ it ( 'sets source if given ' , async function ( ) {
117
117
this . stubs . getInput . withArgs ( 'source' ) . returns ( 'example-app' ) ;
118
118
this . stubs . getInput . withArgs ( 'image' ) . returns ( '' ) ;
119
119
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' ] ) ;
121
124
} ) ;
122
- it ( 'installs beta components with metadata ' , async function ( ) {
125
+ it ( 'sets metadata if given ' , async function ( ) {
123
126
this . stubs . getInput . withArgs ( 'metadata' ) . returns ( 'yaml' ) ;
124
127
this . stubs . getInput . withArgs ( 'image' ) . returns ( '' ) ;
125
128
this . stubs . getInput . withArgs ( 'service' ) . returns ( '' ) ;
126
129
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' ] ) ;
128
134
} ) ;
129
135
it ( 'sets timeout if given' , async function ( ) {
130
136
this . stubs . getInput . withArgs ( 'timeout' ) . returns ( '55m12s' ) ;
@@ -134,16 +140,22 @@ describe('#deploy-cloudrun', function () {
134
140
const args = call . args [ 1 ] ;
135
141
expect ( args ) . to . include . members ( [ '--timeout' , '55m12s' ] ) ;
136
142
} ) ;
137
- it ( 'installs beta components with tag ' , async function ( ) {
143
+ it ( 'sets tag if given ' , async function ( ) {
138
144
this . stubs . getInput . withArgs ( 'tag' ) . returns ( 'test' ) ;
139
145
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' ] ) ;
141
150
} ) ;
142
- it ( 'installs beta components with tag traffic' , async function ( ) {
151
+ it ( 'sets tag traffic if given ' , async function ( ) {
143
152
this . stubs . getInput . withArgs ( 'tag' ) . returns ( 'test' ) ;
144
153
this . stubs . getInput . withArgs ( 'name' ) . returns ( 'service-name' ) ;
145
154
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' ] ) ;
147
159
} ) ;
148
160
it ( 'fails if tag traffic and revision traffic are provided' , async function ( ) {
149
161
this . stubs . getInput . withArgs ( 'revision_traffic' ) . returns ( 'TEST=100' ) ;
0 commit comments