-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance tests to ensure the expected error message is thrown by inval…
…id agent config user input. (#64)
- Loading branch information
1 parent
7035210
commit d3cce4a
Showing
45 changed files
with
57 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/all-invalid_yaml/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yaml: line 1: did not find expected key |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/logging-invalid_exporter_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline "default_pipeline" cannot have an exporter "google" which is not "google_cloud_logging" type |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...enerator/testdata/invalid/linux/logging-invalid_file_type_source_empty_paths/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline "test_pipeline" cannot have an exporter "test_google_cloud_logging" which is not "google_cloud_logging" type |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/logging-invalid_pipeline_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline id prefix 'lib:' is reserved for pre-defined pipelines. Pipeline ID "lib:default_pipeline" is not allowed. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/logging-invalid_processor_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
process id prefix 'lib:' is reserved for pre-defined processors. Processor ID "lib:parse_json_1" is not allowed. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/logging-invalid_receiver_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
receiver id prefix 'lib:' is reserved for pre-defined receivers. Receiver ID "lib:syslog" is not allowed. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...r/testdata/invalid/linux/logging-invalid_syslog_receiver_invalid_listen_host/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline "test_pipeline" cannot have an exporter "test_google_cloud_logging" which is not "google_cloud_logging" type |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...r/testdata/invalid/linux/logging-invalid_syslog_receiver_invalid_listen_port/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline "test_pipeline" cannot have an exporter "test_google_cloud_logging" which is not "google_cloud_logging" type |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...ata/invalid/linux/logging-invalid_syslog_receiver_invalid_transport_protocol/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
syslog type receiver "test_syslog_receiver_invalid_transport_protocol" should have the mode as one of the "tcp", "udp" |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/metrics-collection_interval_below_minimum/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
collection interval 2s for metrics receiver hostmetrics_receiver is below the minimum threshold of 10s. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/metrics-collection_interval_malformed/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
receiver hostmetrics_receiver has invalid collection interval "24": time: missing unit in duration "24" |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/metrics-invalid_exporter_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export id prefix 'lib:' is reserved for pre-defined exporters. Exporter ID "lib:google" is not allowed. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/metrics-invalid_pipeline_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline id prefix 'lib:' is reserved for pre-defined pipelines. Pipeline ID "lib:default_pipeline" is not allowed. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/linux/metrics-invalid_receiver_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
receiver id prefix 'lib:' is reserved for pre-defined receivers. Receiver ID "lib:hostmetrics" is not allowed. |
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
confgenerator/testdata/invalid/windows/all-invalid_yaml/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
yaml: unmarshal errors: | ||
line 1: cannot unmarshal !!str `sdfd` into confgenerator.UnifiedConfig |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...generator/testdata/invalid/windows/metrics-collection_interval_below_minimum/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
collection interval 2s for metrics receiver hostmetrics is below the minimum threshold of 10s. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/windows/metrics-collection_interval_malformed/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
receiver hostmetrics has invalid collection interval "40": time: missing unit in duration "40" |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/windows/metrics-invalid_exporter_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exporter "google" of pipeline "default_pipeline" is not defined |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/windows/metrics-invalid_pipeline_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline id prefix 'lib:' is reserved for pre-defined pipelines. Pipeline ID "lib:default_pipeline" is not allowed. |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
confgenerator/testdata/invalid/windows/metrics-invalid_receiver_id/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
receiver "hostmetrics" of pipeline "default_pipeline" is not defined |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...tor/testdata/invalid/windows/metrics-more_than_one_exporter_of_the_same_type/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exporter "google" of pipeline "default_pipeline" is not defined |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...tor/testdata/invalid/windows/metrics-more_than_one_receiver_of_the_same_type/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
receiver "mssql" of pipeline "default_pipeline" is not defined |
File renamed without changes.
I think this here somehow removed the last empty lines in the updated conf files..