play build: signing passwords only through the child environment, never argv
This commit is contained in:
parent
7960063e0e
commit
e4ebbb825d
5 changed files with 13 additions and 12 deletions
|
|
@ -532,13 +532,16 @@ describe('signed AAB, masked signing, IPA version train, release notes', () => {
|
|||
test('gradleArgs passes the injected signing properties, maskArgs hides the passwords', () => {
|
||||
const argv = gradleArgs(t, { hasWrapper: true, signing: s }, 'linux');
|
||||
expect(argv).toContain('-Pandroid.injected.signing.store.file=/k/upload.jks');
|
||||
expect(argv).toContain('-Pandroid.injected.signing.store.password=pw-store');
|
||||
expect(argv).toContain('-Pandroid.injected.signing.key.alias=upload');
|
||||
expect(argv).toContain('-Pandroid.injected.signing.key.password=pw-key');
|
||||
expect(argv.join(' ')).not.toContain('pw-store');
|
||||
expect(argv.join(' ')).not.toContain('pw-key');
|
||||
expect(argv.join(' ')).not.toContain('password');
|
||||
const env = signingEnv(s);
|
||||
expect(env['ORG_GRADLE_PROJECT_android.injected.signing.store.password']).toBe('pw-store');
|
||||
expect(env['ORG_GRADLE_PROJECT_android.injected.signing.key.password']).toBe('pw-key');
|
||||
const shown = maskArgs(argv).join(' ');
|
||||
expect(shown).not.toContain('pw-store');
|
||||
expect(shown).not.toContain('pw-key');
|
||||
expect(shown).toContain('store.password=***');
|
||||
expect(shown).toContain('key.alias=upload');
|
||||
expect(gradleArgs(t, { hasWrapper: true }, 'linux').join(' ')).not.toContain('signing');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue