Skip to content

Commit

Permalink
Test: API works despite invalid netspoc config
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutzen committed Apr 29, 2024
1 parent 53a87c6 commit d5fc421
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions go/testdata/api/modify.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,30 @@ foo
Error: While reading netspoc files: Typed name expected at line 1 of INPUT, near "--HERE-->foo"
=END=
############################################################
=TITLE=API works regardless of invalid netspoc config
=INPUT=
-- topology
network:a = { ip = 10.1.1.0/24; }
-- config
unknown = value;
=JOB=
{
"method": "add",
"params": {
"path": "network:b",
"value": { "ip": "10.1.2.0/24" }
}
}
=OUTPUT=
@@ API
+network:b = { ip = 10.1.2.0/24; }
=ERROR=
Error: Invalid line in config:
- bad keyword 'unknown'
Aborted
=END=
############################################################
=TITLE=Invalid JSON in job
=INPUT=
Expand Down

0 comments on commit d5fc421

Please sign in to comment.