Skip to content

Commit

Permalink
Update TestVersionUpgradeSingleToLatest8x with container resources
Browse files Browse the repository at this point in the history
  • Loading branch information
thbkrkr committed Mar 28, 2024
1 parent 4a53631 commit 6a67480
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/e2e/es/version_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ package es
import (
"testing"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"

esv1 "github.com/elastic/cloud-on-k8s/v2/pkg/apis/elasticsearch/v1"
"github.com/elastic/cloud-on-k8s/v2/test/e2e/test"
"github.com/elastic/cloud-on-k8s/v2/test/e2e/test/elasticsearch"
Expand Down Expand Up @@ -182,13 +185,22 @@ func TestVersionUpgradeSingleToLatest8x(t *testing.T) {

test.SkipInvalidUpgrade(t, srcVersion, dstVersion)

resources := corev1.ResourceRequirements{
Requests: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceCPU: resource.MustParse("1"),
},
Limits: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceMemory: resource.MustParse("2Gi"),
},
}

initial := elasticsearch.NewBuilder("test-version-up-1-to-8x").
WithVersion(srcVersion).
WithESMasterDataNodes(1, elasticsearch.DefaultResources)
WithESMasterDataNodes(1, resources)

mutated := initial.WithNoESTopology().
WithVersion(dstVersion).
WithESMasterDataNodes(1, elasticsearch.DefaultResources)
WithESMasterDataNodes(1, resources)

RunESMutation(t, initial, mutated)
}
Expand Down

0 comments on commit 6a67480

Please sign in to comment.