TTP Group and Complience test "Bug" #125
-
Hello, I just started making serializer and tests for my organization. Here is what I discovered and wished to know if it was normal or not. First, without a dash : here is a part of my Serialized state for a router device.
I wanted to check that none of the mode had "telnet" in them. So I came up with this test. Now, when I change 'linevty' to 'line-vty' :
(still looks the same) The test doesn't change except for the name of 'linevty' to 'line-vty' : Since, it is a jq error, it might not be the right place to discuss, but I thought someone here would be aware of that problem when using JQ to produce tests quite frequently. Thank you for your help ;) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @aascedu, dash has special meaning in jq, so it breaks variable names by default. You can leverage quotes to escape names with dashes.
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the info
…On Tue 1 Oct 2024 at 15:58, Anton ***@***.***> wrote:
Hey @aascedu <https://github.com/aascedu>, dash has special meaning in
jq, so it breaks variable names by default. You can leverage quotes to
escape names with dashes.
not jq.all('."line-vty"[] | select(.mode == "telnet" or .mode2 == "telnet").range', device.config)
—
Reply to this email directly, view it on GitHub
<#125 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2DITZELORBO2M5D23V4GSLZZKTBXAVCNFSM6AAAAABPFQWNPWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBQHE2TMNA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hey @aascedu, dash has special meaning in jq, so it breaks variable names by default. You can leverage quotes to escape names with dashes.