projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'stable' into develop
[akkoma]
/
test
/
pleroma
/
http
/
adapter_helper
/
gun_test.exs
diff --git
a/test/pleroma/http/adapter_helper/gun_test.exs
b/test/pleroma/http/adapter_helper/gun_test.exs
index 80589c73d5f452cdccb64d4b164afc23055464f7..cfb68557d26fb6c462c2a31c9a0aef6bef2479d4 100644
(file)
--- a/
test/pleroma/http/adapter_helper/gun_test.exs
+++ b/
test/pleroma/http/adapter_helper/gun_test.exs
@@
-1,14
+1,13
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
- use ExUnit.Case
, async: true
+ use ExUnit.Case
use Pleroma.Tests.Helpers
import Mox
use Pleroma.Tests.Helpers
import Mox
- alias Pleroma.Config
alias Pleroma.HTTP.AdapterHelper.Gun
setup :verify_on_exit!
alias Pleroma.HTTP.AdapterHelper.Gun
setup :verify_on_exit!
@@
-52,9
+51,7
@@
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
end
test "parses string proxy host & port" do
end
test "parses string proxy host & port" do
- proxy = Config.get([:http, :proxy_url])
- Config.put([:http, :proxy_url], "localhost:8123")
- on_exit(fn -> Config.put([:http, :proxy_url], proxy) end)
+ clear_config([:http, :proxy_url], "localhost:8123")
uri = URI.parse("https://some-domain.com")
opts = Gun.options([receive_conn: false], uri)
uri = URI.parse("https://some-domain.com")
opts = Gun.options([receive_conn: false], uri)
@@
-62,9
+59,7
@@
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
end
test "parses tuple proxy scheme host and port" do
end
test "parses tuple proxy scheme host and port" do
- proxy = Config.get([:http, :proxy_url])
- Config.put([:http, :proxy_url], {:socks, 'localhost', 1234})
- on_exit(fn -> Config.put([:http, :proxy_url], proxy) end)
+ clear_config([:http, :proxy_url], {:socks, 'localhost', 1234})
uri = URI.parse("https://some-domain.com")
opts = Gun.options([receive_conn: false], uri)
uri = URI.parse("https://some-domain.com")
opts = Gun.options([receive_conn: false], uri)
@@
-72,9
+67,7
@@
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
end
test "passed opts have more weight than defaults" do
end
test "passed opts have more weight than defaults" do
- proxy = Config.get([:http, :proxy_url])
- Config.put([:http, :proxy_url], {:socks5, 'localhost', 1234})
- on_exit(fn -> Config.put([:http, :proxy_url], proxy) end)
+ clear_config([:http, :proxy_url], {:socks5, 'localhost', 1234})
uri = URI.parse("https://some-domain.com")
opts = Gun.options([receive_conn: false, proxy: {'example.com', 4321}], uri)
uri = URI.parse("https://some-domain.com")
opts = Gun.options([receive_conn: false, proxy: {'example.com', 4321}], uri)