Skip to content

Commit e5b84f2

Browse files
committedNov 8, 2019
test: fix git configs for git 2.23 and above
Configs are case sensitive, so setting commit.gpgsign=false was doing nothing.
1 parent 5a3bfbd commit e5b84f2

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed
 

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"postpublish": "git push origin --follow-tags"
1515
},
1616
"tap": {
17+
"timeout": 300,
1718
"check-coverage": true,
1819
"coverage-map": "map.js",
1920
"esm": false

‎test/git.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ t.test('setup', { bail: true }, t => {
6363
return git('init')
6464
.then(() => git('config', 'user.name', 'pacotedev'))
6565
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
66-
.then(() => git('config', 'commit.gpgsign', 'false'))
66+
.then(() => git('config', 'tag.gpgSign', 'false'))
67+
.then(() => git('config', 'commit.gpgSign', 'false'))
6768
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
6869
.then(() => write('package.json', JSON.stringify({
6970
name: 'repo',
@@ -158,7 +159,8 @@ t.test('setup', { bail: true }, t => {
158159
return git('init')
159160
.then(() => git('config', 'user.name', 'pacotedev'))
160161
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
161-
.then(() => git('config', 'commit.gpgsign', 'false'))
162+
.then(() => git('config', 'tag.gpgSign', 'false'))
163+
.then(() => git('config', 'commit.gpgSign', 'false'))
162164
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
163165
.then(() => write('package.json', JSON.stringify({
164166
name: 'submod-repo',

‎test/util/git/clone.js

+10
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ t.test('create repo', { bail: true }, t => {
2222
const git = (...cmd) => spawnGit(cmd, { cwd: repo })
2323
const write = (f, c) => fs.writeFileSync(`${repo}/${f}`, c)
2424
return git('init')
25+
.then(() => git('config', 'user.name', 'pacotedev'))
26+
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
27+
.then(() => git('config', 'tag.gpgSign', 'false'))
28+
.then(() => git('config', 'commit.gpgSign', 'false'))
29+
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
2530
.then(() => write('foo', 'bar'))
2631
.then(() => git('add', 'foo'))
2732
.then(() => git('commit', '-m', 'foobar'))
@@ -83,6 +88,11 @@ t.test('create a repo with a submodule', { bail: true }, t => {
8388
const git = (...cmd) => spawnGit(cmd, { cwd: repo })
8489
const write = (f, c) => fs.writeFileSync(`${repo}/${f}`, c)
8590
return git('init')
91+
.then(() => git('config', 'user.name', 'pacotedev'))
92+
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
93+
.then(() => git('config', 'tag.gpgSign', 'false'))
94+
.then(() => git('config', 'commit.gpgSign', 'false'))
95+
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
8696
.then(() => write('file', 'data'))
8797
.then(() => git('add', 'file'))
8898
.then(() => git('commit', '-m', 'file'))

‎test/util/git/revs.js

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ const git = (...cmd) => spawn(cmd, {cwd: repo})
88
const write = (f, c) => fs.writeFileSync(`${repo}/${f}`, c)
99
t.test('setup', t =>
1010
git('init')
11+
.then(() => git('config', 'user.name', 'pacotedev'))
12+
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
13+
.then(() => git('config', 'tag.gpgSign', 'false'))
14+
.then(() => git('config', 'commit.gpgSign', 'false'))
15+
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
1116
.then(() => write('foo', 'bar'))
1217
.then(() => git('add', 'foo'))
1318
.then(() => git('commit', '-m', 'foobar'))

0 commit comments

Comments
 (0)
Please sign in to comment.