File tree Expand file tree Collapse file tree
tests/test-cases/include-component Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ # https://gitlab.com/ANGkeith/gitlab-ci-local-test tags a commit as `1`, which
3+ # matches the semver range pattern but is not a valid semver version.
4+ include :
5+ - component : gitlab.com/angkeith/gitlab-ci-local-test/my-components@1
Original file line number Diff line number Diff line change @@ -197,3 +197,28 @@ component-job:
197197
198198 expect ( writeStreams . stdoutLines [ 0 ] ) . toEqual ( expected ) ;
199199} ) ;
200+
201+ test . concurrent ( "include-component component (non semver tag)" , async ( ) => {
202+ initSpawnSpy ( [ WhenStatics . mockGitRemoteHttp ] ) ;
203+
204+ const writeStreams = new WriteStreamsMock ( ) ;
205+ await handler ( {
206+ cwd : "tests/test-cases/include-component/component-non-semver-tag" ,
207+ preview : true ,
208+ stateDir : ".gitlab-ci-local-include-component-non-semver-tag" ,
209+ } , writeStreams ) ;
210+
211+ const expected = `---
212+ stages:
213+ - .pre
214+ - build
215+ - test
216+ - deploy
217+ - .post
218+ component-job:
219+ script:
220+ - echo job 1
221+ stage: test` ;
222+
223+ expect ( writeStreams . stdoutLines [ 0 ] ) . toEqual ( expected ) ;
224+ } ) ;
You can’t perform that action at this time.
0 commit comments