@@ -151,7 +151,7 @@ def setup_connections(self, create_connection_without_db):
151151 host = AIRFLOW_HTTPS_URL ,
152152 conn_type = "git" ,
153153 extra = {
154- "github_app_id " : "12345" ,
154+ "github_client_id " : "12345" ,
155155 "github_installation_id" : "67890" ,
156156 "private_key" : "inline_pem_key" ,
157157 },
@@ -162,7 +162,7 @@ def setup_connections(self, create_connection_without_db):
162162 conn_id = CONN_APP_ONLY_APP_ID ,
163163 host = AIRFLOW_HTTPS_URL ,
164164 conn_type = "git" ,
165- extra = {"github_app_id " : "12345" },
165+ extra = {"github_client_id " : "12345" },
166166 )
167167 )
168168 create_connection_without_db (
@@ -178,7 +178,7 @@ def setup_connections(self, create_connection_without_db):
178178 conn_id = CONN_APP_NO_KEY ,
179179 host = AIRFLOW_HTTPS_URL ,
180180 conn_type = "git" ,
181- extra = {"github_app_id " : "12345" , "github_installation_id" : "67890" },
181+ extra = {"github_client_id " : "12345" , "github_installation_id" : "67890" },
182182 )
183183 )
184184 create_connection_without_db (
@@ -187,7 +187,7 @@ def setup_connections(self, create_connection_without_db):
187187 host = AIRFLOW_HTTPS_URL ,
188188 conn_type = "git" ,
189189 extra = {
190- "github_app_id " : "not_an_int" ,
190+ "github_client_id " : "not_an_int" ,
191191 "github_installation_id" : "67890" ,
192192 "private_key" : "inline_pem_key" ,
193193 },
@@ -199,7 +199,7 @@ def setup_connections(self, create_connection_without_db):
199199 host = AIRFLOW_HTTPS_URL ,
200200 conn_type = "git" ,
201201 extra = {
202- "github_app_id " : "12345" ,
202+ "github_client_id " : "12345" ,
203203 "github_installation_id" : "not_an_int" ,
204204 "private_key" : "inline_pem_key" ,
205205 },
@@ -442,34 +442,34 @@ def test_passphrase_askpass_cleaned_up(self, create_connection_without_db):
442442
443443 def test_only_app_id_without_installation_id_raises (self ):
444444 with pytest .raises (
445- AirflowException , match = "Both 'github_app_id ' and 'github_installation_id' must be provided"
445+ ValueError , match = "Both 'github_client_id ' and 'github_installation_id' must be provided"
446446 ):
447447 GitHook (git_conn_id = CONN_APP_ONLY_APP_ID )
448448
449449 def test_only_installation_id_without_app_id_raises (self ):
450450 with pytest .raises (
451- AirflowException ,
452- match = "Both 'github_app_id ' and 'github_installation_id' must be provided" ,
451+ ValueError ,
452+ match = "Both 'github_client_id ' and 'github_installation_id' must be provided" ,
453453 ):
454454 GitHook (git_conn_id = CONN_APP_ONLY_INSTALLATION_ID )
455455
456456 def test_app_id_and_installation_id_without_key_raises (self ):
457457 with pytest .raises (
458- AirflowException ,
458+ ValueError ,
459459 match = "Missing inline private_key or key_file for GitHub App Auth" ,
460460 ):
461461 GitHook (git_conn_id = CONN_APP_NO_KEY )
462462
463463 def test_invalid_github_app_id_raises (self ):
464464 with pytest .raises (
465- AirflowException ,
466- match = "Invalid 'github_app_id ' value" ,
465+ ValueError ,
466+ match = "Invalid 'github_client_id ' value" ,
467467 ):
468468 GitHook (git_conn_id = CONN_APP_INVALID_APP_ID )
469469
470470 def test_invalid_github_installation_id_raises (self ):
471471 with pytest .raises (
472- AirflowException ,
472+ ValueError ,
473473 match = "Invalid 'github_installation_id' value" ,
474474 ):
475475 GitHook (git_conn_id = CONN_APP_INVALID_INSTALLATION_ID )
@@ -483,7 +483,7 @@ def test_app_auth_with_key_file_reads_file(self, create_connection_without_db, t
483483 host = AIRFLOW_HTTPS_URL ,
484484 conn_type = "git" ,
485485 extra = {
486- "github_app_id " : "12345" ,
486+ "github_client_id " : "12345" ,
487487 "github_installation_id" : "67890" ,
488488 "key_file" : str (key_file ),
489489 },
@@ -505,13 +505,13 @@ def test_app_auth_with_missing_key_file_raises(self, create_connection_without_d
505505 host = AIRFLOW_HTTPS_URL ,
506506 conn_type = "git" ,
507507 extra = {
508- "github_app_id " : "12345" ,
508+ "github_client_id " : "12345" ,
509509 "github_installation_id" : "67890" ,
510510 "key_file" : "/nonexistent/path/key.pem" ,
511511 },
512512 )
513513 )
514- with pytest .raises (AirflowException , match = "Failed to read GitHub App private key file" ):
514+ with pytest .raises (OSError , match = "Failed to read GitHub App private key file" ):
515515 GitHook (git_conn_id = "git_app_missing_key_file" )
516516
517517 def test_app_auth_success_injects_token_into_https_url (self ):
@@ -535,7 +535,7 @@ def test_app_auth_success_stores_app_id_and_installation_id(self):
535535 lambda self : ("x-access-token" , mock_token ),
536536 )
537537 hook = GitHook (git_conn_id = CONN_APP_INLINE_KEY )
538- assert hook .github_app_id == 12345
538+ assert hook .github_client_id == 12345
539539 assert hook .github_installation_id == 67890
540540
541541 @pytest .mark .parametrize (
@@ -554,7 +554,7 @@ def test_app_id_and_installation_id_parsed_as_int(
554554 host = AIRFLOW_HTTPS_URL ,
555555 conn_type = "git" ,
556556 extra = {
557- "github_app_id " : app_id ,
557+ "github_client_id " : app_id ,
558558 "github_installation_id" : installation_id ,
559559 "private_key" : "inline_pem_key" ,
560560 },
@@ -566,5 +566,5 @@ def test_app_id_and_installation_id_parsed_as_int(
566566 lambda self : ("x-access-token" , "token" ),
567567 )
568568 hook = GitHook (git_conn_id = "git_app_int_check" )
569- assert isinstance (hook .github_app_id , int )
569+ assert isinstance (hook .github_client_id , int )
570570 assert isinstance (hook .github_installation_id , int )
0 commit comments