Unified Storage: Testing For Fix Create, Update and Delete wrt Resource Versions (#88568)
Add testing harness
This commit is contained in:
committed by
GitHub
parent
6fcd7d9e03
commit
5fc580b401
@@ -0,0 +1,35 @@
|
||||
package sqlstash
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestValidateEntity(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
err := validateEntity(newEmptyEntity())
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestValidateLabels(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
err := validateLabels(map[string]string{})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestValidateFields(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
err := validateFields(map[string]string{})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// Silence the `unused` linter until we implement and use these validations.
|
||||
var (
|
||||
_ = validateEntity
|
||||
_ = validateLabels
|
||||
_ = validateFields
|
||||
)
|
||||
Reference in New Issue
Block a user