Skip to content

Commit c47d794

Browse files
committed
Skip tests that don't work on MacOS
1 parent 84bc85c commit c47d794

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

test/nerves/artifact/resolver_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ defmodule Nerves.Artifact.ResolverTest do
33

44
alias Nerves.Artifact
55

6+
# Only run on Linux for now
7+
@moduletag :linux
8+
69
setup_all do
710
{:ok, pid} = Nerves.TestServer.Router.start_link()
811
[server: pid]

test/nerves/utils_test.exs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@ defmodule Nerves.UtilsTest do
55

66
alias Nerves.Utils
77

8+
@tag :linux
89
test "proxy_config returns no credentials when no proxy supplied" do
910
assert Utils.Proxy.config("http://nerves-project.org") == []
1011
end
1112

13+
@tag :linux
1214
test "proxy_config returns http_proxy credentials when supplied" do
1315
System.put_env("HTTP_PROXY", "http://nerves:test@example.com")
1416
assert Utils.Proxy.config("http://nerves-project.org") == [proxy_auth: {~c"nerves", ~c"test"}]
1517
System.delete_env("HTTP_PROXY")
1618
end
1719

20+
@tag :linux
1821
test "proxy_config returns http_proxy credentials when only username supplied" do
1922
System.put_env("HTTP_PROXY", "http://nopass@example.com")
2023
assert Utils.Proxy.config("http://nerves-project.org") == [proxy_auth: {~c"nopass", ~c""}]
2124
System.delete_env("HTTP_PROXY")
2225
end
2326

27+
@tag :linux
2428
test "proxy_config returns credentials when the protocol is https" do
2529
System.put_env("HTTPS_PROXY", "https://test:nerves@example.com")
2630

@@ -31,6 +35,7 @@ defmodule Nerves.UtilsTest do
3135
System.delete_env("HTTPS_PROXY")
3236
end
3337

38+
@tag :linux
3439
test "proxy_config returns empty list when no credentials supplied" do
3540
System.put_env("HTTP_PROXY", "http://example.com")
3641
assert Utils.Proxy.config("http://nerves-project.org") == []

test/test_helper.exs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ System.put_env("NERVES_LOG_DISABLE_PROGRESS_BAR", "1")
1616
# Clear the project stack in preparation for loading and unloading fixtures
1717
Mix.ProjectStack.clear_stack()
1818

19+
excludes = if :os.type() != {:unix, :linux}, do: [:linux, :skip], else: [:skip]
20+
1921
# Long assert receive timeout is for CircleCI.
20-
ExUnit.start(exclude: [:skip], assert_receive_timeout: 500)
22+
ExUnit.start(exclude: excludes, assert_receive_timeout: 500)

0 commit comments

Comments
 (0)