-
Notifications
You must be signed in to change notification settings - Fork 405
Deprecate TypeMap field in synthetics #870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Elem: syntheticsTestRequest(), | ||
}, | ||
"request_definition": { | ||
Description: "The synthetics test request. Required if `type = \"api\"` and `subtype = \"http\"`.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part may be legacy but Required if type = "api" and subtype = "http".
is not true, it should be just Required if type = "api"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me. Couple minor questions on the tests
timeoutInt, _ := strconv.Atoi(attr.(string)) | ||
if attr, ok := k.GetOkWith("timeout"); ok { | ||
var timeoutInt int | ||
// first try to convert to int if we're getting from the new TypeList field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanity checking; is this because everything in a TypeMap is a string, regardless of what the Type is set as?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -30,33 +30,6 @@ func TestAccDatadogSyntheticsAPITest_importBasic(t *testing.T) { | |||
ResourceName: "datadog_synthetics_test.foo", | |||
ImportState: true, | |||
ImportStateVerify: true, | |||
// Assertions will be imported into the new schema by default, but we can ignore them as users need to update the local config in this case | |||
ImportStateVerifyIgnore: []string{"assertions", "assertion", "options", "options_list"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want verification on these fields
}) | ||
} | ||
|
||
func TestAccDatadogSyntheticsAPITest_importBasicNewAssertionsOptions(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we covering this import elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecated field cannot be imported, as the implementation of read prefers the new fields when not set in config (which is the case for import)
I modified the main test config to not have any deprecated fields in it, so the other import tests now does the proper verifications (without the importIgnore)
This one is then rendered useless, as it's just a duplication
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
deprecate typeMap
request
in favor of typeListrequest_definition