Skip to content

Commit e1316b1

Browse files
committed
test: allow filtered public projection verify
1 parent 62ee604 commit e1316b1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/deploy.test.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ test('install plan is deploy schema data and remains dry-run by default', () =>
4444
})
4545

4646
test('public projection publish jobs do not expose GitLab control-plane identity', () => {
47+
if (!fs.existsSync('.gitlab-ci.yml')) {
48+
assert.equal(fs.existsSync('scripts/publish_public_repos.sh'), false)
49+
return
50+
}
4751
const ci = fs.readFileSync('.gitlab-ci.yml', 'utf8')
4852
const publicRepos = ci.match(/publish_public_repositories:[\s\S]*?(?=\npublish_wiki_projection:)/)?.[0] || ''
4953
const publicWikis = ci.match(/publish_wiki_projection:[\s\S]*?(?=\nclose_public_projection_approval:)/)?.[0] || ''
@@ -58,6 +62,10 @@ test('public projection publish jobs do not expose GitLab control-plane identity
5862
})
5963

6064
test('public wiki projection skips missing wiki remotes unless required', () => {
65+
if (!fs.existsSync('scripts/publish_wikis.sh')) {
66+
assert.equal(fs.existsSync('.gitlab-ci.yml'), false)
67+
return
68+
}
6169
const wikiPublisher = fs.readFileSync('scripts/publish_wikis.sh', 'utf8')
6270
assert.match(wikiPublisher, /wiki skipped: \$\{label\} remote missing/)
6371
assert.match(wikiPublisher, /PUBLIC_WIKI_REQUIRED:-0/)

0 commit comments

Comments
 (0)