mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-27 09:21:14 -06:00
command: Fix various TestMetaBackend-prefix tests
Our new state model has a different implementation of "empty" that doesn't consider lineage/serial, so we need to have some actual content in these state fixtures to avoid them being skipped during state migrations.
This commit is contained in:
parent
22c84c71a4
commit
f39a5d0962
@ -502,8 +502,8 @@ func TestMetaBackend_configureNewWithStateExisting(t *testing.T) {
|
||||
if state == nil {
|
||||
t.Fatal("state is nil")
|
||||
}
|
||||
if testStateMgrCurrentLineage(s) != "local" {
|
||||
t.Fatalf("bad: %#v", state)
|
||||
if got, want := testStateMgrCurrentLineage(s), "local"; got != want {
|
||||
t.Fatalf("wrong lineage %q; want %q", got, want)
|
||||
}
|
||||
|
||||
// Write some state
|
||||
@ -1414,8 +1414,8 @@ func TestMetaBackend_configuredUnsetCopy(t *testing.T) {
|
||||
if state == nil {
|
||||
t.Fatal("state is nil")
|
||||
}
|
||||
if testStateMgrCurrentLineage(s) != "configuredUnset" {
|
||||
t.Fatalf("bad: %#v", state)
|
||||
if got, want := testStateMgrCurrentLineage(s), "configuredUnset"; got != want {
|
||||
t.Fatalf("wrong state lineage %q; want %q", got, want)
|
||||
}
|
||||
|
||||
// Verify a backup doesn't exist
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change"
|
||||
"lineage": "backend-change",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change"
|
||||
"lineage": "backend-change",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change-env2"
|
||||
"lineage": "backend-change-env2",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change-env1"
|
||||
"lineage": "backend-change-env1",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change-env2"
|
||||
"lineage": "backend-change-env2",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change-env2"
|
||||
"lineage": "backend-change-env2",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change"
|
||||
"lineage": "backend-change",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change-env2"
|
||||
"lineage": "backend-change-env2",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change"
|
||||
"lineage": "backend-change",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "backend-change"
|
||||
"lineage": "backend-change",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -8,7 +8,12 @@
|
||||
"path": [
|
||||
"root"
|
||||
],
|
||||
"outputs": {},
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {},
|
||||
"depends_on": []
|
||||
}
|
||||
|
@ -2,5 +2,17 @@
|
||||
"version": 3,
|
||||
"terraform_version": "0.8.2",
|
||||
"serial": 7,
|
||||
"lineage": "configuredUnset"
|
||||
"lineage": "configuredUnset",
|
||||
"modules": [
|
||||
{
|
||||
"path": ["root"],
|
||||
"outputs": {
|
||||
"foo": {
|
||||
"type": "string",
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"resources": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user