Skip to content

Commit a881ea9

Browse files
committed
Set docker image (required in production).
Added validation of spec to ensure that is all good. [ci LONG=1] [ci TESTOPTIONS="-test.run ^TestProduction$"]
1 parent 1584f1b commit a881ea9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/modes_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"testing"
2929

3030
"github.com/dchest/uniuri"
31+
"github.com/stretchr/testify/assert"
3132

3233
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3334

@@ -51,8 +52,10 @@ func TestProduction(t *testing.T) {
5152
deploymentTemplate.Spec.StorageEngine = api.NewStorageEngine(engine)
5253
deploymentTemplate.Spec.TLS = api.TLSSpec{} // should auto-generate cert
5354
deploymentTemplate.Spec.Environment = api.NewEnvironment(api.EnvironmentProduction)
55+
deploymentTemplate.Spec.Image = util.NewString("arangodb/arangodb:3.3.4")
5456
deploymentTemplate.Spec.DBServers.Count = util.NewInt(4)
5557
deploymentTemplate.Spec.SetDefaults(deploymentTemplate.GetName()) // this must be last
58+
assert.NoError(t, deploymentTemplate.Spec.Validate())
5659

5760
dbserverCount := *deploymentTemplate.Spec.DBServers.Count
5861
if dbserverCount < 3 {

0 commit comments

Comments
 (0)