-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
TestCase: Fix TC for Log Analytics #18205
Conversation
512c4dc
to
e6a89aa
Compare
internal/services/loganalytics/log_analytics_linked_storage_account_resource.go
Outdated
Show resolved
Hide resolved
ie, why are we ignoring case now? |
bb75143
to
e6a89aa
Compare
@katbyte , I thought of another way to fix these TCs. Please take another look. Thanks. |
internal/services/loganalytics/log_analytics_datasource_windows_event_resource.go
Outdated
Show resolved
Hide resolved
internal/services/loganalytics/log_analytics_linked_storage_account_resource.go
Outdated
Show resolved
Hide resolved
if we are doing anything we should be correcting the case on read to the correct case expected not ignoring case |
@katbyte , thanks for your suggestion. I've updated PR. Please take another look. Thanks. |
internal/services/loganalytics/log_analytics_linked_storage_account_resource.go
Outdated
Show resolved
Hide resolved
@katbyte , thanks for your comment. I've updated PR. Please take another look. Thanks. |
}, true), | ||
DiffSuppressFunc: suppress.CaseDifference, |
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.
can we flag these with 4.0 - we want all 4.0 changes flagged so 4.0 is just a matter of flipping the flag
}, true), | |
DiffSuppressFunc: suppress.CaseDifference, | |
}, !features.FourPointOhBeta), | |
DiffSuppressFunc: !features.FourPointOhBeta, |
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 cannot use "DiffSuppressFunc: !features.FourPointOhBeta" since DiffSuppressFunc requires dynamic value. So I flag it via another way. Please take another look. Thanks.
@katbyte , thanks for your comment. I've updated code. Please take another look. Thanks. |
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.
is this a duplicate of https://github.com/hashicorp/terraform-provider-azurerm/pull/18116/files ?
@katbyte , yes, but seems PR 18116 only fixed one issue. I fixed two issues. One fix is setting ignoreCase of ValidateFunc to true to allow lower case in tf config to avoid breaking change. Another fix is adding DiffSuppress to ignore the difference between the value in state file (ex: "CustomLogs") and the value in tf config (ex: "customlogs"). |
Closing as i think #18116 has fixed the same issue, the code changes here seem to be the same. do let me know if i am mistaken |
@katbyte , this PR also fixed the TCs of |
@katbyte , I filed a new PR to fix the TCs of azurerm_log_analytics_datasource_windows_event if you don't mind. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR is to fix TCs for Log Analytics.
--- PASS: TestAccLogAnalyticsDataSourceWindowsEvent_complete (265.56s)
--- PASS: TestAccLogAnalyticsDataSourceWindowsEvent_basic (298.34s)
--- PASS: TestAccLogAnalyticsDataSourceWindowsEvent_requiresImport (307.01s)
--- PASS: TestAccLogAnalyticsDataSourceWindowsEvent_update (540.47s)
--- PASS: TestAcclogAnalyticsLinkedStorageAccount_complete (304.24s)
--- PASS: TestAcclogAnalyticsLinkedStorageAccount_basic (309.85s)
--- PASS: TestAcclogAnalyticsLinkedStorageAccount_ingestion (312.96s)
--- PASS: TestAcclogAnalyticsLinkedStorageAccount_requiresImport (357.57s)
--- PASS: TestAcclogAnalyticsLinkedStorageAccount_update (558.49s)