From 371f122483fb7efb99e274c0f23cd51172e0120a Mon Sep 17 00:00:00 2001 From: Connor Rigby Date: Fri, 7 Jun 2024 11:44:16 -0700 Subject: [PATCH] check other whenwhere url Signed-off-by: Connor Rigby --- .circleci/config.yml | 2 +- test/vintage_net/connectivity/when_where_test.exs | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0573954d..6b1346ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,7 +35,7 @@ jobs: keys: - v1-mix-cache-<< parameters.tag >>-{{ checksum "mix.lock" }} - run: mix deps.get - - run: mix test --exclude requires_ipv6 --exclude whenwhere + - run: mix test --exclude requires_ipv6 - when: condition: matches: { <<: *latest, value: << parameters.tag >> } diff --git a/test/vintage_net/connectivity/when_where_test.exs b/test/vintage_net/connectivity/when_where_test.exs index 211c8c04..10180564 100644 --- a/test/vintage_net/connectivity/when_where_test.exs +++ b/test/vintage_net/connectivity/when_where_test.exs @@ -20,4 +20,18 @@ defmodule VintageNet.Connectivity.WhenWhereTest do _ -> false end) end + + test "when/where no cname" do + ifname = Utils.get_ifname_for_tests() + + {:ok, normalized_whenwhere} = + WhenWhere.normalize({WhenWhere, url: "http://dnlawqcegshx3.cloudfront.net"}) + + assert {:ok, {:internet, properties}} = WhenWhere.check(ifname, normalized_whenwhere) + + assert Enum.find(properties, fn + {["timestamp"], _} -> true + _ -> false + end) + end end