@@ -48,6 +48,7 @@ describe('hlx deploy', () => {
4848 mockDeploy . withAddStrain . returnsThis ( ) ;
4949 mockDeploy . withStatic . returnsThis ( ) ;
5050 mockDeploy . withMinify . returnsThis ( ) ;
51+ mockDeploy . withResolveGitRefService . returnsThis ( ) ;
5152 mockDeploy . run . returnsThis ( ) ;
5253
5354 // disable static functions as well to avoid shelljs executions.
@@ -128,6 +129,7 @@ OpenWhisk Namespace is required`);
128129 sinon . assert . calledWith ( mockDeploy . withCircleciAuth , '' ) ;
129130 sinon . assert . calledWith ( mockDeploy . withDryRun , false ) ;
130131 sinon . assert . calledWith ( mockDeploy . withMinify , false ) ;
132+ sinon . assert . calledWith ( mockDeploy . withResolveGitRefService , 'helix-services/resolve-git-ref@v1' ) ;
131133 sinon . assert . calledOnce ( mockDeploy . run ) ;
132134 } ) ;
133135
@@ -151,6 +153,7 @@ OpenWhisk Namespace is required`);
151153 sinon . assert . calledWith ( mockDeploy . withCircleciAuth , 'foobar' ) ;
152154 sinon . assert . calledWith ( mockDeploy . withDryRun , true ) ;
153155 sinon . assert . calledWith ( mockDeploy . withMinify , true ) ;
156+ sinon . assert . calledWith ( mockDeploy . withResolveGitRefService , 'resolve.api' ) ;
154157 sinon . assert . calledOnce ( mockDeploy . run ) ;
155158 } ) ;
156159
@@ -369,4 +372,17 @@ OpenWhisk Namespace is required`);
369372 sinon . assert . calledWith ( mockDeploy . withAddStrain , '' ) ;
370373 sinon . assert . calledOnce ( mockDeploy . run ) ;
371374 } ) ;
375+
376+ it ( 'hlx deploy can set the resolve api' , ( ) => {
377+ new CLI ( )
378+ . withCommandExecutor ( 'deploy' , mockDeploy )
379+ . run ( [ 'deploy' ,
380+ '--wsk-auth' , 'secret-key' ,
381+ '--wsk-namespace' , 'hlx' ,
382+ '--svc-resolve-git-ref' , 'helix-services/foobar' ,
383+ ] ) ;
384+
385+ sinon . assert . calledWith ( mockDeploy . withResolveGitRefService , 'helix-services/foobar' ) ;
386+ sinon . assert . calledOnce ( mockDeploy . run ) ;
387+ } ) ;
372388} ) ;
0 commit comments