mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Add prerelease test with multiple constraints.
Signed-off-by: AYM1607 <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
08ad2f5983
commit
03c6700fd2
@ -276,6 +276,11 @@ func TestModuleInstaller_Prerelease(t *testing.T) {
|
|||||||
modulePath: "testdata/prerelease-constraint-v",
|
modulePath: "testdata/prerelease-constraint-v",
|
||||||
expectedVersion: "v0.0.2",
|
expectedVersion: "v0.0.2",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "multiple constraints",
|
||||||
|
modulePath: "testdata/prerelease-constraint-multiple",
|
||||||
|
shouldError: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "err",
|
name: "err",
|
||||||
modulePath: "testdata/prerelease-constraint-err",
|
modulePath: "testdata/prerelease-constraint-err",
|
||||||
|
13
internal/initwd/testdata/prerelease-constraint-multiple/root.tf
vendored
Normal file
13
internal/initwd/testdata/prerelease-constraint-multiple/root.tf
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# We expect this test to error out because multiple constraints are
|
||||||
|
# ANDed, and a prerelease constraint will not match non-prerelease
|
||||||
|
# versions.
|
||||||
|
#
|
||||||
|
# Registry versions are:
|
||||||
|
# - 0.0.3-alpha.1
|
||||||
|
# - 0.0.2
|
||||||
|
# - 0.0.1
|
||||||
|
|
||||||
|
module "acctest" {
|
||||||
|
source = "hashicorp/module-installer-acctest/aws"
|
||||||
|
version = "0.0.3-alpha.1, >=0.0.2"
|
||||||
|
}
|
@ -1,6 +1,11 @@
|
|||||||
# We expect this test to download the version 0.0.2, the one before the
|
# We expect this test to download the version 0.0.2, the one before the
|
||||||
# specified version even with the equality because the specified version is a
|
# specified version even with the equality because the specified version is a
|
||||||
# prerelease.
|
# prerelease.
|
||||||
|
#
|
||||||
|
# Registry versions are:
|
||||||
|
# - 0.0.3-alpha.1
|
||||||
|
# - 0.0.2
|
||||||
|
# - 0.0.1
|
||||||
|
|
||||||
module "acctest" {
|
module "acctest" {
|
||||||
source = "hashicorp/module-installer-acctest/aws"
|
source = "hashicorp/module-installer-acctest/aws"
|
||||||
|
Loading…
Reference in New Issue
Block a user