Repository navigation
add AZT006: update tests must apply two different configs - #69
Merged
Merged
Conversation
katbyte
force-pushed
the
kt/azt006-update-test-single-config
branch
from
October 9, 2026 21:17
c15a7d5 to
169519b
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new rule, AZT006, that reports update tests applying a single config, or the same config more than once.
Why: an update test exists to run the resource's Update path. With one config it only proves the resource can be created, and with the same config twice the second apply is a no-op plan. The name says the update was tested when it never ran. A survey of azurerm found two such tests, the healthcare service identity update and the Security Center subscription pricing update, plus one scale set test that applies the same rolling-update config twice.
Update tests that never update. A test counts when a segment of its name after the first underscore starts with
update, the same reading AZT005 uses, so_update,_updateSkuand_list_updatecount and_autoUpdateEnableddoes not. The configs are theConfigvalues of theTestStepliterals in the body, compared as written, so the same helper with different arguments is a different config. A test with no steps of its own delegates to a helper, and the helper is checked instead; lowercasetestAcchelpers count, since sequential tests keep their steps there.Things that are fine as they are. Names where
updateis inside a word, such asimagesDisableAutomaticUpdateorAutoUpdates, are feature names and are not reported; a looser reading would have flagged four of those in azurerm. Delegating wrappers like the Cosmos DB account update tests, which hand off to a helper with the steps, are not reported either.The rule only reports.