Skip to content

Commit f841505

Browse files
committed
log path
1 parent 59ce5f5 commit f841505

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/keys/get-management-token.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ describe('getManagementToken', () => {
3737
const httpClient = { post } as unknown as HttpClient
3838
const getManagementToken = createGetManagementToken(logger, httpClient, defaultCache)
3939

40+
console.log('dirname is ', __dirname)
41+
console.log('dirname is ', path.dirname(__dirname))
42+
console.log('Private Key Location:', path.join(__dirname, '..', '..', 'keys', 'key.pem'))
4043
const result = await getManagementToken(PRIVATE_KEY, DEFAULT_OPTIONS)
4144

4245
assert.deepStrictEqual(result, mockToken)

test/integration/keys.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ describe('Keys Utilities', () => {
2424
throw new Error('Missing Environment setup')
2525
}
2626

27-
const privateKey = fs.readFileSync(path.join(__dirname, '..', '..', 'keys', 'key.pem'), 'utf-8')
27+
const privateKeyPath = path.join(__dirname, '..', '..', 'keys', 'key.pem')
28+
console.log(fs.readdirSync(path.dirname(privateKeyPath)))
29+
30+
const privateKey = fs.readFileSync(privateKeyPath, 'utf-8')
2831

2932
const token = await getManagementToken(privateKey, {
3033
appInstallationId,

test/make-private-keys.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
mkdir -p keys
44

55
openssl req -x509 -newkey rsa:4096 -nodes -batch -noout -keyout keys/key.pem
6-
openssl rsa -in keys/key.pem -pubout -outform DER -out keys/key.der.pub
6+
openssl rsa -in keys/key.pem -pubout -outform DER -out keys/key.der.pub
7+
echo "Newly created private and public keys:"
8+
ls -l keys

0 commit comments

Comments
 (0)