Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dsa0x committed Dec 17, 2024
1 parent f0bfb61 commit aea2a5a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
8 changes: 7 additions & 1 deletion internal/command/test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,19 @@ func TestTest_Runs(t *testing.T) {
code: 0,
},
"mocking": {
expectedOut: []string{"6 passed, 0 failed."},
expectedOut: []string{"7 passed, 0 failed."},
code: 0,
},
"mocking-invalid": {
expectedErr: []string{"Invalid outputs attribute"},
initCode: 1,
},
"mocking-error": {
expectedErr: []string{"Unknown condition value",
"test_resource.primary[0].id",
},
code: 1,
},
"dangling_data_block": {
expectedOut: []string{"2 passed, 0 failed."},
code: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ run "test" {
command = plan

assert {
condition = test_resource.primary[0].id != "bbbb"
condition = test_resource.primary[0].id == "bbbb"
error_message = "plan should not have the overridden value"
}

Expand Down
13 changes: 0 additions & 13 deletions internal/terraform/node_resource_abstract_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1250,19 +1250,6 @@ func (n *NodeAbstractResourceInstance) plan(
return plan, state, deferred, keyData, diags
}

// func getMockedData(override *configs.Override, isPlan bool) *mocking.MockedData {
// if override == nil {
// return nil
// }
// return &mocking.MockedData{
// Value: override.Values,
// Range: override.Range,
// // Apply never ignores computed values. This attribute only matters
// // when we are planning.
// ComputedAsUnknown: override.IgnoreValues && isPlan,
// }
// }

func (n *NodeAbstractResource) processIgnoreChanges(prior, config cty.Value, schema *configschema.Block) (cty.Value, tfdiags.Diagnostics) {
// ignore_changes only applies when an object already exists, since we
// can't ignore changes to a thing we've not created yet.
Expand Down

0 comments on commit aea2a5a

Please sign in to comment.