Skip to content

Commit

Permalink
chore: remove unused function (#807)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreatma authored Oct 29, 2024
1 parent 3623385 commit a89f32f
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions equinix/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,6 @@ func TestProvider_isEmpty(t *testing.T) {
}
}

func TestProvider_setSchemaValueIfNotEmpty(t *testing.T) {
// given
key := "test"
s := map[string]*schema.Schema{
key: {
Type: schema.TypeString,
Optional: true,
},
}
var b *int = nil
d := schema.TestResourceDataRaw(t, s, make(map[string]interface{}))
// when
setSchemaValueIfNotEmpty(key, b, d)
// then
_, ok := d.GetOk(key)
assert.False(t, ok, "Key was not set")
}

// Deprecated test moved to internal/comparissons/comparisons_test.go
func TestProvider_slicesMatch(t *testing.T) {
// given
Expand Down Expand Up @@ -250,10 +232,3 @@ func copyMap(source map[string]interface{}) map[string]interface{} {
}
return target
}

func setSchemaValueIfNotEmpty(key string, value interface{}, d *schema.ResourceData) error {
if !isEmpty(value) {
return d.Set(key, value)
}
return nil
}

0 comments on commit a89f32f

Please sign in to comment.