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:
parent
99d36dd203
commit
a433259696
1 changed files with 15 additions and 0 deletions
15
pkg/apis/deployment/v1alpha/license_spec_test.go
Normal file
15
pkg/apis/deployment/v1alpha/license_spec_test.go
Normal 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())
|
||||
}
|
Loading…
Reference in a new issue