File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ def test_global_edgar_endpoint_smoke(monkeypatch):
1212 client = flask_app .test_client ()
1313
1414 # Ambil API key dari environment variable
15- api_key = os .getenv ('API_KEY' )
15+ # PERBAIKAN: Menggunakan nama secret yang benar 'API_KEYS'
16+ api_key = os .getenv ('API_KEYS' )
1617 # PENTING: Ganti 'X-API-KEY' jika nama header Anda berbeda
1718 headers = {'X-API-KEY' : api_key }
1819
Original file line number Diff line number Diff line change @@ -21,9 +21,11 @@ def client(self):
2121 @pytest .fixture
2222 def auth_headers (self ):
2323 """Fixture to create authentication headers from environment variable."""
24- api_key = os .getenv ('API_KEY' )
24+ # PERBAIKAN: Menggunakan nama secret yang benar 'API_KEYS'
25+ api_key = os .getenv ('API_KEYS' )
2526 if not api_key :
26- pytest .fail ("API_KEY environment variable not set. Please set it in GitHub Secrets." )
27+ # PERBAIKAN: Pesan error disesuaikan
28+ pytest .fail ("API_KEYS environment variable not set. Please set it in GitHub Secrets." )
2729 # PENTING: Ganti 'X-API-KEY' jika nama header Anda berbeda
2830 return {'X-API-KEY' : api_key }
2931
You can’t perform that action at this time.
0 commit comments