Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused function #807

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
Loading