Skip to content

Commit

Permalink
Allow cellular configurations without "config" sections. (#1172)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Nov 8, 2024
1 parent 132be41 commit 11995b5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/parse-pod-specification-test.toit
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import .utils

main:
test-examples
test-cellular
test-custom-envelope
test-warnings
test-errors
Expand All @@ -22,6 +23,22 @@ test-examples:
PodSpecification.from-json INITIAL-POD-SPECIFICATION --path="ignored" --cli=cli
PodSpecification.from-json EXAMPLE-POD-SPECIFICATION --path="ignored" --cli=cli

test-cellular:
cli := TestCli
cellular := new-valid
connection := {
"type": "cellular",
}
cellular["connections"][0] = connection
PodSpecification.from-json cellular --path="ignored" --cli=cli

// With config.
connection["config"] = {
"cellular.apn": "apn",
"cellular.log.level": 0
}
PodSpecification.from-json cellular --path="ignored" --cli=cli

expect-format-error str/string json/Map:
exception := catch: PodSpecification.from-json json --path="ignored" --cli=TestCli
expect exception is PodSpecificationException
Expand Down

0 comments on commit 11995b5

Please sign in to comment.