Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the temporary directory before writing the cert file #137

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/assent/http_adapter/httpc_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ defmodule Assent.HTTPAdapter.HttpcTest do

assert {:ok, %HTTPResponse{status: 200, body: "HTTP/1.1"}} = Httpc.request(:get, TestServer.url(), nil, [], ssl: [cacerts: TestServer.x509_suite().cacerts])

File.mkdir_p!("tmp")
File.write!("tmp/cacerts.pem", :public_key.pem_encode(Enum.map(TestServer.x509_suite().cacerts, &{:Certificate, &1, :not_encrypted})))
TestServer.add("/", via: :get)

Expand Down
2 changes: 1 addition & 1 deletion test/assent/strategies/oauth2_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ defmodule Assent.Strategy.OAuth2Test do
end

test "with `:private_key_jwt` auth method with private key as file", %{config: config, callback_params: params} do
File.mkdir("tmp/")
File.mkdir_p!("tmp/")
File.write!("tmp/private-key.pem", @private_key)

config =
Expand Down
2 changes: 1 addition & 1 deletion test/assent/strategies/oauth_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ defmodule Assent.Strategy.OAuthTest do
end

test "with `:private_key_path` config", %{config: config} do
File.mkdir("tmp/")
File.mkdir_p!("tmp/")
File.write!("tmp/private-key.pem", @private_key)

config =
Expand Down
Loading