Skip to content

Commit

Permalink
Update images used in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
  • Loading branch information
wallyqs committed Jun 14, 2019
1 parent 428b2ee commit 0470f2d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 10 deletions.
37 changes: 37 additions & 0 deletions pkg/util/versionCheck/versionCheck_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package versionCheck

import (
"testing"
)

func TestServerBinaryPath(t *testing.T) {
got := ServerBinaryPath("2.0.0")
expected := NatsBinaryPath
if got != expected {
t.Fatalf("Expected %q, got: %q", expected, got)
}

got = ServerBinaryPath("2.1.8")
expected = NatsBinaryPath
if got != expected {
t.Fatalf("Expected %q, got: %q", expected, got)
}

got = ServerBinaryPath("2.1.8-RC18")
expected = NatsBinaryPath
if got != expected {
t.Fatalf("Expected %q, got: %q", expected, got)
}

got = ServerBinaryPath("0.1.8")
expected = OldNatsBinaryPath
if got != expected {
t.Fatalf("Expected %q, got: %q", expected, got)
}

got = ServerBinaryPath("1.4.1")
expected = OldNatsBinaryPath
if got != expected {
t.Fatalf("Expected %q, got: %q", expected, got)
}
}
6 changes: 2 additions & 4 deletions test/e2e/lame_duck_mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ func TestLameDuckModeWhenScalingDown(t *testing.T) {
var (
initialSize = 3
finalSize = 1
// TODO Replace with an adequate stable tag once there is one.
version = "5d86964"
// TODO Remove once the "nats" image has an adequate stable tag.
serverImage = "natsop2018/gnatsd"
serverImage = "synadia/nats-server"
version = "2.0.0"
)

var (
Expand Down
6 changes: 2 additions & 4 deletions test/e2e/super_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ import (
func TestCreateServerWithGateways(t *testing.T) {
var (
size = 1
image = "synadia/nats-server"
version = "edge-v2.0.0-RC12"
version = "2.0.0"
nc *natsv1alpha2.NatsCluster
err error
)
nc, err = f.CreateCluster(f.Namespace, "", size, version,
func(cluster *natsv1alpha2.NatsCluster) {
cluster.Name = "test-nats-gw"
cluster.Spec.ServerImage = image

cluster.Spec.ServerConfig = &natsv1alpha2.ServerConfig{
Debug: true,
Expand Down Expand Up @@ -138,7 +136,7 @@ func TestCreateServerWithGatewayAndLeafnodes(t *testing.T) {
var (
size = 1
image = "synadia/nats-server"
version = "edge-v2.0.0-RC12"
version = "2.0.0"
nc *natsv1alpha2.NatsCluster
err error

Expand Down
3 changes: 1 addition & 2 deletions test/e2e/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ func TestCreateClusterWithVerifyAndMap(t *testing.T) {
// The NatsCluster resource must be called "nats" in
// order for the pre-provisioned certificates to work.
natsCluster.Name = "nats-verify"
natsCluster.Spec.ServerImage = "wallyqs/nats-server"
natsCluster.Spec.Version = "edge-2.0.0-RC5"
natsCluster.Spec.Version = "2.0.0"

// Enable TLS using pre-provisioned certificates.
natsCluster.Spec.TLS = &natsv1alpha2.TLSConfig{
Expand Down

0 comments on commit 0470f2d

Please # to comment.