@@ -41,8 +41,18 @@ config :code_corps, :icon_color_generator, CodeCorps.RandomIconColor.TestGenerat
4141# Set Corsica logging to output no console warning when rejecting a request
4242config :code_corps , :corsica_log_level , [ rejected: :debug ]
4343
44- # Set the GitHub module
45- config :code_corps , github: CodeCorps.GitHubTesting
44+ # fall back to sample pem if none is available as an ENV variable
45+ pem = case System . get_env ( "GITHUB_TEST_APP_PEM" ) do
46+ nil -> "./test/fixtures/github/app.pem" |> File . read!
47+ encoded_pem -> encoded_pem |> Base . decode64!
48+ end
49+
50+ config :code_corps ,
51+ github: CodeCorps.GitHub.SuccessAPI ,
52+ github_app_id: System . get_env ( "GITHUB_TEST_APP_ID" ) ,
53+ github_app_client_id: System . get_env ( "GITHUB_TEST_APP_CLIENT_ID" ) ,
54+ github_app_client_secret: System . get_env ( "GITHUB_TEST_APP_CLIENT_SECRET" ) ,
55+ github_app_pem: pem
4656
4757config :sentry ,
4858 environment_name: Mix . env || :test
@@ -57,13 +67,3 @@ config :code_corps,
5767
5868config :code_corps , :cloudex , CloudexTest
5969config :cloudex , api_key: "test_key" , secret: "test_secret" , cloud_name: "test_cloud_name"
60-
61- # fall back to sample pem if none is available as an ENV variable
62- pem = case System . get_env ( "GITHUB_APP_PEM" ) do
63- nil -> "./test/fixtures/github/app.pem" |> File . read!
64- encoded_pem -> encoded_pem |> Base . decode64!
65- end
66-
67- config :code_corps ,
68- github: CodeCorps.GitHub.SuccessAPI ,
69- github_app_pem: pem
0 commit comments