Skip to content

Commit

Permalink
test: added test case
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-FFFFFF authored and lonegunmanb committed Jul 16, 2024
1 parent 2fb06dd commit adac09d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions rules/provider_minimum_major_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ func TestModtmProviderVersionRule(t *testing.T) {
version = "~> 0.3.0"
}
}
}`,
rule: rules.NewProviderVersionRule("modtm", "Azure/modtm", "~> 0.3", []string{
"0.2.999",
"1.0.0",
}),
expected: helper.Issues{},
},
{
desc: "modtm defined with correct version constraint but different case",
config: `terraform {
required_providers {
modtm = {
source = "azure/modtm"
version = "~> 0.3.0"
}
}
}`,
rule: rules.NewProviderVersionRule("modtm", "Azure/modtm", "~> 0.3", []string{
"0.2.999",
Expand Down

0 comments on commit adac09d

Please sign in to comment.