Add ES8 tests, add test data for breaking change

This commit is contained in:
hoenn 2024-04-02 12:05:13 -04:00
Родитель 40a2451c8c
Коммит d3e80c18c2
8 изменённых файлов: 155 добавлений и 3 удалений

Просмотреть файл

Просмотреть файл

@ -0,0 +1,20 @@
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }

Просмотреть файл

@ -0,0 +1,20 @@
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test", "_type" : "testdoc" } }
{ "stat" : "test_data", "value": "foo" }

Просмотреть файл

@ -0,0 +1,20 @@
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test"} }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }
{ "index" : { "_index" : "integration_test" } }
{ "stat" : "test_data", "value": "foo" }

Просмотреть файл

@ -0,0 +1,82 @@
version: '3'
services:
elasticsearch-v8:
build:
context: .
dockerfile: elasticsearch.dockerfile
image: vulcanizer-elasticsearch:v8
container_name: vulcanizer-elasticsearch-v8
environment:
- cluster.name=vulcanizer-elasticsearch-v8
- node.name=vulcanizer-elasticsearch-v8
- bootstrap.memory_lock=true
- "path.repo=/backups"
- "discovery.seed_hosts=vulcanizer-elasticsearch-v8,vulcanizer-elasticsearch-v8-2"
- "cluster.initial_master_nodes=vulcanizer-elasticsearch-v8,vulcanizer-elasticsearch-v8-2"
- "ES_JAVA_OPTS=-Xms512M -Xmx512M"
- xpack.security.enabled=false
- xpack.profiling.enabled=false
- xpack.ml.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
- ingest.geoip.downloader.enabled=false
- indices.lifecycle.history_index_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
ports:
- 49200:9200
networks:
- vulcanizer-esnet
volumes:
- vulcanizer-backup-volume:/backups
elasticsearch-v8-2:
build:
context: .
dockerfile: elasticsearch.dockerfile
image: vulcanizer-elasticsearch:v8
depends_on:
- "elasticsearch-v8"
container_name: vulcanizer-elasticsearch-v8-2
environment:
- cluster.name=vulcanizer-elasticsearch-v8
- bootstrap.memory_lock=true
- node.name=vulcanizer-elasticsearch-v8-2
- "path.repo=/backups"
- "discovery.seed_hosts=vulcanizer-elasticsearch-v8,vulcanizer-elasticsearch-v8-2"
- "cluster.initial_master_nodes=vulcanizer-elasticsearch-v8,vulcanizer-elasticsearch-v8-2"
- "ES_JAVA_OPTS=-Xms512M -Xmx512M"
- xpack.security.enabled=false
- xpack.profiling.enabled=false
- xpack.ml.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
- ingest.geoip.downloader.enabled=false
- indices.lifecycle.history_index_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
networks:
- vulcanizer-esnet
volumes:
- vulcanizer-backup-volume:/backups
networks:
vulcanizer-esnet:
volumes:
vulcanizer-backup-volume:

Просмотреть файл

@ -0,0 +1,7 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:8.13.0
USER root
RUN mkdir /backups && chown elasticsearch:elasticsearch /backups
USER elasticsearch

Просмотреть файл

@ -1,11 +1,13 @@
//go:build integration
// +build integration // +build integration
package vulcanizer_test package vulcanizer_test
import ( import (
"github.com/github/vulcanizer"
"testing" "testing"
"time" "time"
"github.com/github/vulcanizer"
) )
func TestNodes(t *testing.T) { func TestNodes(t *testing.T) {

Просмотреть файл

@ -17,7 +17,8 @@ fi
# Run regular unit tests first # Run regular unit tests first
./script/test ./script/test
elasticsearch_versions=(v5 v6 v7) # These match integration_data/ sub-folder names
elasticsearch_versions=(v5 v6 v7 v8)
for v in "${elasticsearch_versions[@]}" for v in "${elasticsearch_versions[@]}"
do do
@ -44,7 +45,7 @@ do
} }
}' }'
echo "Filling in data to integration_test index" echo "Filling in data to integration_test index"
curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:49200/_bulk --data-binary "@../documents.dat"; echo curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:49200/_bulk --data-binary "@documents.dat"; echo
echo "Creating snapshot repository backup-repo" echo "Creating snapshot repository backup-repo"
curl -H "Content-Type: application/json" -XPUT localhost:49200/_snapshot/backup-repo -d '{ "type": "fs", "settings": { "location": "/backups" } }' curl -H "Content-Type: application/json" -XPUT localhost:49200/_snapshot/backup-repo -d '{ "type": "fs", "settings": { "location": "/backups" } }'
echo "Making snapshot snapshot_1 in repository backup-repo" echo "Making snapshot snapshot_1 in repository backup-repo"