---
cases:
  - data:
    modules:
      - |
        package test

        p = x {
          x := net.lookup_ip_addr("10.0.0.0")
        }
    note: net.lookup_ip_addr/simple ip4 returns that ip4
    query: data.test.p = x
    want_result:
      - x:
          - 10.0.0.0
  - data:
    modules:
      - |
        package test

        p = x {
          x := net.lookup_ip_addr("::")
        }
    note: net.lookup_ip_addr/simple ip6 returns that ip6
    query: data.test.p = x
    want_result:
      - x:
          - "::"
  - data:
    modules:
      - |
        package test
        # one of these should be the case on any system
        p {
          net.lookup_ip_addr("localhost") == {"127.0.0.1"}
        }
        p {
          net.lookup_ip_addr("localhost") == {"127.0.0.1", "::1"}
        }
        p {
          net.lookup_ip_addr("localhost") == {"::1"}
        }
    note: net.lookup_ip_addr/localhost
    query: data.test.p = x
    want_result:
      - x: true
