@@ -67,7 +67,7 @@ func TestGenerate(t *testing.T) {
6767 defer httpmock .DeactivateAndReset ()
6868
6969 // Read test key for base64 encoding
70- keyBytes , err := os .ReadFile ("fixtures/test-private-key.pem" )
70+ keyBytes , err := os .ReadFile ("fixtures/test-private-key.test. pem" )
7171 assert .NoError (t , err )
7272 keyBase64 := base64 .StdEncoding .EncodeToString (keyBytes )
7373
@@ -93,7 +93,7 @@ func TestGenerate(t *testing.T) {
9393 flags : map [string ]interface {}{
9494 "app-id" : "123456" ,
9595 "installation-id" : "12345" ,
96- "key" : "fixtures/test-private-key.pem" ,
96+ "key" : "fixtures/test-private-key.test. pem" ,
9797 "hostname" : "api.github.com" ,
9898 "jwt-expiry" : 10 ,
9999 "silent" : true ,
@@ -124,7 +124,7 @@ func TestGenerate(t *testing.T) {
124124 name : "successful_with_auto_installation_id" ,
125125 flags : map [string ]interface {}{
126126 "app-id" : "123456" ,
127- "key" : "fixtures/test-private-key.pem" ,
127+ "key" : "fixtures/test-private-key.test. pem" ,
128128 "hostname" : "api.github.com" ,
129129 "jwt-expiry" : 10 ,
130130 "silent" : true ,
@@ -141,7 +141,7 @@ func TestGenerate(t *testing.T) {
141141 name : "successful_jwt_only" ,
142142 flags : map [string ]interface {}{
143143 "app-id" : "123456" ,
144- "key" : "fixtures/test-private-key.pem" ,
144+ "key" : "fixtures/test-private-key.test. pem" ,
145145 "jwt" : true ,
146146 "jwt-expiry" : 10 ,
147147 "silent" : true ,
@@ -161,7 +161,7 @@ func TestGenerate(t *testing.T) {
161161 name : "error_both_keys_specified" ,
162162 flags : map [string ]interface {}{
163163 "app-id" : "123456" ,
164- "key" : "fixtures/test-private-key.pem" ,
164+ "key" : "fixtures/test-private-key.test. pem" ,
165165 "base64-key" : keyBase64 ,
166166 },
167167 setupMocks : func () {},
@@ -189,7 +189,7 @@ func TestGenerate(t *testing.T) {
189189 name : "error_installation_not_found" ,
190190 flags : map [string ]interface {}{
191191 "app-id" : "123456" ,
192- "key" : "fixtures/test-private-key.pem" ,
192+ "key" : "fixtures/test-private-key.test. pem" ,
193193 },
194194 setupMocks : func () {
195195 httpmock .RegisterResponder ("GET" , "https://api.github.com/app/installations?per_page=1" ,
@@ -202,7 +202,7 @@ func TestGenerate(t *testing.T) {
202202 flags : map [string ]interface {}{
203203 "app-id" : "123456" ,
204204 "installation-id" : "12345" ,
205- "key" : "fixtures/test-private-key.pem" ,
205+ "key" : "fixtures/test-private-key.test. pem" ,
206206 },
207207 setupMocks : func () {
208208 httpmock .RegisterResponder ("POST" , "https://api.github.com/app/installations/12345/access_tokens" ,
@@ -399,7 +399,7 @@ func TestGenerateAdvancedCases(t *testing.T) {
399399 setupTest : func () * cli.Context {
400400 return createTestContext (map [string ]interface {}{
401401 "app-id" : "123456" ,
402- "key" : "fixtures/test-private-key.pem" ,
402+ "key" : "fixtures/test-private-key.test. pem" ,
403403 "jwt-expiry" : 0 , // Below minimum, should be adjusted to 10
404404 "jwt" : true ,
405405 "silent" : true ,
@@ -413,7 +413,7 @@ func TestGenerateAdvancedCases(t *testing.T) {
413413 setupTest : func () * cli.Context {
414414 return createTestContext (map [string ]interface {}{
415415 "app-id" : "123456" ,
416- "key" : "fixtures/test-private-key.pem" ,
416+ "key" : "fixtures/test-private-key.test. pem" ,
417417 "jwt-expiry" : 15 , // Above maximum, should be adjusted to 10
418418 "jwt" : true ,
419419 "silent" : true ,
@@ -428,7 +428,7 @@ func TestGenerateAdvancedCases(t *testing.T) {
428428 return createTestContext (map [string ]interface {}{
429429 "app-id" : "123456" ,
430430 "installation-id" : "12345" ,
431- "key" : "fixtures/test-private-key.pem" ,
431+ "key" : "fixtures/test-private-key.test. pem" ,
432432 "hostname" : "github.company.com" , // Without /api/v3
433433 "silent" : true ,
434434 })
@@ -450,7 +450,7 @@ func TestGenerateAdvancedCases(t *testing.T) {
450450 return createTestContext (map [string ]interface {}{
451451 "app-id" : "123456" ,
452452 "installation-id" : "12345" ,
453- "key" : "fixtures/test-private-key.pem" ,
453+ "key" : "fixtures/test-private-key.test. pem" ,
454454 "hostname" : "github.company.com/api/v3" , // Already has /api/v3
455455 "silent" : true ,
456456 })
@@ -507,7 +507,7 @@ func TestGenerateWithOutputFormats(t *testing.T) {
507507 flags : map [string ]interface {}{
508508 "app-id" : "123456" ,
509509 "installation-id" : "12345" ,
510- "key" : "fixtures/test-private-key.pem" ,
510+ "key" : "fixtures/test-private-key.test. pem" ,
511511 "hostname" : "api.github.com" ,
512512 "jwt-expiry" : 10 ,
513513 "silent" : false , // To test JSON output
@@ -522,7 +522,7 @@ func TestGenerateWithOutputFormats(t *testing.T) {
522522 flags : map [string ]interface {}{
523523 "app-id" : "123456" ,
524524 "installation-id" : "12345" ,
525- "key" : "fixtures/test-private-key.pem" ,
525+ "key" : "fixtures/test-private-key.test. pem" ,
526526 "hostname" : "api.github.com" ,
527527 "jwt-expiry" : 10 ,
528528 "token-only" : true ,
@@ -537,7 +537,7 @@ func TestGenerateWithOutputFormats(t *testing.T) {
537537 name : "jwt_output_format" ,
538538 flags : map [string ]interface {}{
539539 "app-id" : "123456" ,
540- "key" : "fixtures/test-private-key.pem" ,
540+ "key" : "fixtures/test-private-key.test. pem" ,
541541 "jwt" : true ,
542542 "jwt-expiry" : 10 ,
543543 "silent" : false , // To test JWT output
0 commit comments