1
0
Fork 0
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:
Ewout Prangsma 2018-03-29 10:54:14 +02:00
parent 1584f1b85c
commit a881ea98ee
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698

View file

@ -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 {