diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2023-04-04 19:00:44 +0100 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2023-04-11 17:52:05 +0100 |
commit | 96a2f7b1d9891d40cdeeaa657ee84af0d00dcc9b (patch) | |
tree | 067650443c5e2a939d21049e2b1e6d2911b0f13d /integration-test/src/test/resources/data | |
parent | ce880216ec85aa12c1fda23c3abaf4bd16d9595d (diff) |
Migrate query tests to integration-test module #2
- Migrate some query tests to integration-test
- Edit bookstore model to add integer leaf-list 'editions'
- Lower cps-ri code coverage
Issue-ID: CPS-1597
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: If50bf15ad7d7f147448f6b60d464efc1cdc91005
Diffstat (limited to 'integration-test/src/test/resources/data')
3 files changed, 100 insertions, 74 deletions
diff --git a/integration-test/src/test/resources/data/bookstore/bookstore.yang b/integration-test/src/test/resources/data/bookstore/bookstore.yang index 2179fb93d9..c3bfc50dc1 100644 --- a/integration-test/src/test/resources/data/bookstore/bookstore.yang +++ b/integration-test/src/test/resources/data/bookstore/bookstore.yang @@ -21,37 +21,37 @@ module stores { type string; } - list categories { + list categories { - key "code"; + key "code"; - leaf code { - type string; - } - - leaf name { - type string; - } - - list books { - key title; - - leaf title { + leaf code { type string; } - leaf lang { - type string; - } - leaf-list authors { + + leaf name { type string; } - leaf pub_year { - type year; - } - leaf price { - type uint64; + + list books { + key title; + + leaf title { + type string; + } + leaf lang { + type string; + } + leaf-list authors { + type string; + } + leaf-list editions { + type year; + } + leaf price { + type uint64; + } } } } - } } diff --git a/integration-test/src/test/resources/data/bookstore/bookstoreData.json b/integration-test/src/test/resources/data/bookstore/bookstoreData.json index 1c6cb88f98..f9bac6012c 100644 --- a/integration-test/src/test/resources/data/bookstore/bookstoreData.json +++ b/integration-test/src/test/resources/data/bookstore/bookstoreData.json @@ -10,14 +10,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -30,7 +30,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -43,12 +43,38 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 + }, + { + "title": "A Book with No Language", + "lang": "", + "authors": ["Joe Bloggs"], + "editions": [2023], + "price": 20 + } + ] + }, + { + "code": 4, + "name": "Computing", + "books" : [ + { + "title": "Debian GNU/Linux", + "lang": "German", + "authors": ["Peter H. Ganten", "Wulf Alex"], + "editions": [2007, 2013, 2021], + "price": 39 + }, + { + "title": "Logarithm tables", + "lang": "N/A", + "authors": ["Joe Bloggs"], + "editions": [2009], + "price": 11 } ] } - ] } -}
\ No newline at end of file +} diff --git a/integration-test/src/test/resources/data/bookstore/largeModelData.json b/integration-test/src/test/resources/data/bookstore/largeModelData.json index bdc22a7172..4a92a1da74 100644 --- a/integration-test/src/test/resources/data/bookstore/largeModelData.json +++ b/integration-test/src/test/resources/data/bookstore/largeModelData.json @@ -10,14 +10,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -30,7 +30,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -43,7 +43,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -56,14 +56,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -76,7 +76,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -89,7 +89,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -102,14 +102,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -122,7 +122,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -135,7 +135,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -148,14 +148,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -168,7 +168,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -181,7 +181,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -194,14 +194,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -214,7 +214,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -227,7 +227,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -240,14 +240,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -260,7 +260,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -273,7 +273,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -286,14 +286,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -306,7 +306,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -319,7 +319,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -332,14 +332,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -352,7 +352,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -365,7 +365,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -378,14 +378,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -398,7 +398,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -411,7 +411,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -424,14 +424,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -444,7 +444,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -457,7 +457,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] @@ -470,14 +470,14 @@ "title": "Matilda", "lang": "English", "authors": ["Roald Dahl"], - "pub_year": 1988, + "editions": [1988, 2000], "price": 10 }, { "title": "The Gruffalo", "lang": "English", "authors": ["Julia Donaldson"], - "pub_year": 1999, + "editions": [1999], "price": 15 } ] @@ -490,7 +490,7 @@ "title": "Annihilation", "lang": "English", "authors": ["Jeff VanderMeer"], - "pub_year": 2014, + "editions": [2014], "price": 15 } ] @@ -503,7 +503,7 @@ "title": "Good Omens", "lang": "English", "authors": ["Neil Gaiman", "Terry Pratchett"], - "pub_year": 2006, + "editions": [2006], "price": 13 } ] |