Skip to content

Commit

Permalink
Unit tests for ConfigParser (close #51)
Browse files Browse the repository at this point in the history
  • Loading branch information
spenes committed Jan 5, 2024
1 parent cc9a736 commit e97b738
Show file tree
Hide file tree
Showing 13 changed files with 380 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"field1": "value1",
"field2": 10,
"field3": true,
"field4": {
"field41": "value41",
"field42": "value42"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
snowplow {
"field1": "value1",
"field2": 10,
"field3": true,
"field4": {
"field41": "value41",
"field42": "value42"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"field1": "value1",
"field2": 10,
"field3": true,
"field4":
"field41": "value41",
"field42": "value42"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"field1": "value1",
"field2": 10,
"field3": true,
"field4": {
"field42": "value42"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"field1": "value1",
"field2": 10,
"field3": true,
"field4": {
"field41": ${CONFIG_PARSER_TEST_ENV},
"field42": "value42"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"field1": ${subfield.a},
"field2": 10,
"field3": true,
"field4": {
"field41": ${subfield.b},
"field42": "value42"
}
"subfield": {
"a": "sub1"
"b": "sub2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"field1": "value1",
"field2": 10,
"field3": true,
"field4": {
"field41": ${UNSET_ENV_VAR},
"field42": "value42"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
wrongnamespace {
"field1": "value1",
"field2": 10,
"field3": true,
"field4": {
"field41": "value41",
"field42": "value42"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-1",
"data": {
"cacheSize": 500,
"repositories": [
{
"name": "Iglu Central",
"priority": 0,
"vendorPrefixes": [ "com.snowplowanalytics" ],
"connection": {
"http": {
"uri": "http://iglucentral.com"
}
}
},
{
"name": "Iglu Central - GCP Mirror",
"priority": 1,
"vendorPrefixes": [ "com.snowplowanalytics" ],
"connection": {
"http": {
"uri": "http://mirror01.iglucentral.com"
}
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-1",
"data": {
"cacheSize": 500,
"repositories": [
"name": "Iglu Central",
"priority": 0,
"vendorPrefixes": [ "com.snowplowanalytics" ],
"connection": {
"http": {
"uri": "http://iglucentral.com"
}
}
},
{
"name": "Iglu Central - GCP Mirror",
"priority": 1,
"vendorPrefixes": [ "com.snowplowanalytics" ],
"connection": {
"http": {
"uri": "http://mirror01.iglucentral.com"
}
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-1",
"data": {
"repositories": [
{
"name": "Iglu Central",
"priority": 0,
"vendorPrefixes": [ "com.snowplowanalytics" ],
"connection": {
"http": {
"uri": "http://iglucentral.com"
}
}
},
{
"name": "Iglu Central - GCP Mirror",
"priority": 1,
"vendorPrefixes": [ "com.snowplowanalytics" ],
"connection": {
"http": {
"uri": "http://mirror01.iglucentral.com"
}
}
}
]
}
}
Loading

0 comments on commit e97b738

Please sign in to comment.