Skip to content

Commit

Permalink
Adjust installation test (#100)
Browse files Browse the repository at this point in the history
* Adjust installation test

During installation, we start elasticsearch a couple of times and
check that we can connect to it. Since elastic/elasticsearch#72300
this tests ( and installation for that matter) has been failing
since security is enabled by default and we make requests without
credentials.

This change, as a temporary measure, makes it so that we start
elasticsearch with security explicitly disabled temporarily during
installation so that we can make the necessary connection test
requests without credentials.

In a follow-up, we will adjust the Formula to take advantage of
newly added functionality, set and show the password for the
elastic user during installation (similar to what we do in
elastic/elasticsearch#75144). We can then also use this password
to make the test requests without needing to disable authN.

* that other test too
  • Loading branch information
jkakavas authored Sep 7, 2021
1 parent 5c694f1 commit 56b7b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Formula/elasticsearch-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def plist

pid = testpath/"pid"
begin
system "#{bin}/elasticsearch", "-d", "-p", pid, "-Epath.data=#{testpath}/data", "-Epath.logs=#{testpath}/logs", "-Enode.name=test-cli", "-Ehttp.port=#{port}"
system "#{bin}/elasticsearch", "-d", "-p", pid, "-Expack.security.enabled=false", "-Epath.data=#{testpath}/data", "-Epath.logs=#{testpath}/logs", "-Enode.name=test-cli", "-Ehttp.port=#{port}"
sleep 30
system "curl", "-XGET", "localhost:#{port}/"
output = shell_output("curl -s -XGET localhost:#{port}/_cat/nodes")
Expand All @@ -140,7 +140,7 @@ def plist

pid = testpath/"pid"
begin
system "#{bin}/elasticsearch", "-d", "-p", pid
system "#{bin}/elasticsearch", "-d", "-p", pid, "-Expack.security.enabled=false"
sleep 30
system "curl", "-XGET", "localhost:#{port}/"
output = shell_output("curl -s -XGET localhost:#{port}/_cat/nodes")
Expand Down

0 comments on commit 56b7b0b

Please sign in to comment.