Skip to content

Commit 5e24512

Browse files
committed
Change up some of the CSV tests pt. 2
1 parent b80ef49 commit 5e24512

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

docs/reference/query-languages/esql/_snippets/functions/examples/network_direction.md

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/functions/network_direction.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/docs/functions/network_direction.md

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/qa/testFixtures/src/main/resources/ip.csv-spec

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -753,15 +753,26 @@ fe80::cae2:65ff:fece:feb9 | 127.0.0.3 | inbound
753753
networkDirectionFromRow
754754
required_capability: network_direction
755755

756-
// tag::networkDirectionFromRow[]
757756
ROW ip0 = "1.2.3.4"::ip, ip1 = "5.6.7.8"::ip, networks = ["loopback", "private"]
758757
| EVAL direction = network_direction(ip0, ip1, networks)
759758
| DROP networks
760-
// end::networkDirectionFromRow[]
761759
;
762760

763-
// tag::networkDirectionFromRow-result[]
764761
ip0:ip | ip1:ip | direction:keyword
765762
1.2.3.4 | 5.6.7.8 | external
766-
// end::networkDirectionFromRow-result[]
763+
;
764+
765+
networkDirectionFromRowWithInlineNetworks
766+
required_capability: network_direction
767+
768+
// tag::networkDirectionFromRowWithInlineNetworks[]
769+
ROW ip0 = "1.2.3.4"::ip, ip1 = "5.6.7.8"::ip
770+
| EVAL direction = network_direction(ip0, ip1, ["loopback", "private"])
771+
// end::networkDirectionFromRowWithInlineNetworks[]
772+
;
773+
774+
// tag::networkDirectionFromRowWithInlineNetworks-result[]
775+
ip0:ip | ip1:ip | direction:keyword
776+
1.2.3.4 | 5.6.7.8 | external
777+
// end::networkDirectionFromRowWithInlineNetworks-result[]
767778
;

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/ip/NetworkDirection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class NetworkDirection extends EsqlScalarFunction {
5858
@FunctionInfo(
5959
returnType = "keyword",
6060
description = "Returns the direction type (inbound, outbound, internal, external) given a source IP address, destination IP address, and a list of internal networks.",
61-
examples = @Example(file = "ip", tag = "networkDirectionFromRow")
61+
examples = @Example(file = "ip", tag = "networkDirectionFromRowWithInlineNetworks")
6262
)
6363
public NetworkDirection(
6464
Source source,

0 commit comments

Comments
 (0)