|
|
@@ -45,6 +45,7 @@ import static org.elasticsearch.packaging.util.Docker.getImageLabels;
|
|
|
import static org.elasticsearch.packaging.util.Docker.getJson;
|
|
|
import static org.elasticsearch.packaging.util.Docker.mkDirWithPrivilegeEscalation;
|
|
|
import static org.elasticsearch.packaging.util.Docker.removeContainer;
|
|
|
+import static org.elasticsearch.packaging.util.Docker.restartContainer;
|
|
|
import static org.elasticsearch.packaging.util.Docker.rmDirWithPrivilegeEscalation;
|
|
|
import static org.elasticsearch.packaging.util.Docker.runContainer;
|
|
|
import static org.elasticsearch.packaging.util.Docker.runContainerExpectingFailure;
|
|
|
@@ -676,6 +677,20 @@ public class DockerTests extends PackagingTestCase {
|
|
|
assertThat(result.stderr, containsString("ERROR: ES_LOG_STYLE set to [unknown]. Expected [console] or [file]"));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Check that it when configuring logging to write to disk, the container can be restarted.
|
|
|
+ */
|
|
|
+ public void test124CanRestartContainerWithStackLoggingConfig() throws Exception {
|
|
|
+ runContainer(distribution(), builder().envVars(Map.of("ES_LOG_STYLE", "file")));
|
|
|
+
|
|
|
+ waitForElasticsearch(installation);
|
|
|
+
|
|
|
+ restartContainer();
|
|
|
+
|
|
|
+ // If something went wrong running Elasticsearch the second time, this will fail.
|
|
|
+ waitForElasticsearch(installation);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Check that the Java process running inside the container has the expected UID, GID and username.
|
|
|
*/
|