Skip to content

Commit

Permalink
Remove default PVCs when setting emptyDirs in E2E tests (elastic#2085)
Browse files Browse the repository at this point in the history
We recently changed the way we handle default PVCs in all E2E tests. An
unfortunate consequence is that clusters configured for using EmptyDirs
also have a default PVC set (but not used), which makes the
`TestVolumeEmptyDir` fail.

This commit fixes it by removing any PVC when setting emptyDirs.
  • Loading branch information
sebgl authored Oct 30, 2019
1 parent 94c4ae6 commit 1e4d67d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/e2e/test/elasticsearch/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ func (b Builder) WithESSecureSettings(secretNames ...string) Builder {

func (b Builder) WithEmptyDirVolumes() Builder {
for i := range b.Elasticsearch.Spec.NodeSets {
// remove any default claim
b.Elasticsearch.Spec.NodeSets[i].VolumeClaimTemplates = nil
// setup an EmptyDir for the data volume
b.Elasticsearch.Spec.NodeSets[i].PodTemplate.Spec.Volumes = []corev1.Volume{
{
Name: volume.ElasticsearchDataVolumeName,
Expand Down

0 comments on commit 1e4d67d

Please sign in to comment.