1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Added unit test for LicenseSpec.

This commit is contained in:
lamai93 2018-12-04 15:22:56 +01:00
parent 99d36dd203
commit a433259696

View file

@ -0,0 +1,15 @@
package v1alpha
import (
"testing"
"github.com/arangodb/kube-arangodb/pkg/util"
"github.com/stretchr/testify/assert"
)
func TestLicenseSpecValidation(t *testing.T) {
assert.Nil(t, LicenseSpec{SecretName: nil}.Validate())
assert.Nil(t, LicenseSpec{SecretName: util.NewString("some-name")}.Validate())
assert.Error(t, LicenseSpec{SecretName: util.NewString("@@")}.Validate())
}