signalfx / signalfx-go

Go client library and instrumentation bindings for SignalFx
https://www.signalfx.com
Apache License 2.0
14 stars 48 forks source link

Adding ValidateDetector and its unit tests #142

Closed akashg-crest closed 2 years ago

akashg-crest commented 2 years ago

Adding ValidateDetector function to enable terraform-provider-signalfx to perform validation at the time of terraform plan.

Changes made in the code are:

  1. Updated Rules from ValidateDetectorRequestModel to match the desired structure.
  2. Addition of ValidateDetector() function for the endpoint '/validate' of Detector API.
  3. Addition of corresponding positive and negative test cases for the ValidateDetector function.