mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
Set docker image (required in production).
Added validation of spec to ensure that is all good. [ci LONG=1] [ci TESTOPTIONS="-test.run ^TestProduction$"]
This commit is contained in:
parent
1584f1b85c
commit
a881ea98ee
1 changed files with 3 additions and 0 deletions
|
@ -28,6 +28,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/dchest/uniuri"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
|
@ -51,8 +52,10 @@ func TestProduction(t *testing.T) {
|
|||
deploymentTemplate.Spec.StorageEngine = api.NewStorageEngine(engine)
|
||||
deploymentTemplate.Spec.TLS = api.TLSSpec{} // should auto-generate cert
|
||||
deploymentTemplate.Spec.Environment = api.NewEnvironment(api.EnvironmentProduction)
|
||||
deploymentTemplate.Spec.Image = util.NewString("arangodb/arangodb:3.3.4")
|
||||
deploymentTemplate.Spec.DBServers.Count = util.NewInt(4)
|
||||
deploymentTemplate.Spec.SetDefaults(deploymentTemplate.GetName()) // this must be last
|
||||
assert.NoError(t, deploymentTemplate.Spec.Validate())
|
||||
|
||||
dbserverCount := *deploymentTemplate.Spec.DBServers.Count
|
||||
if dbserverCount < 3 {
|
||||
|
|
Loading…
Reference in a new issue