-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update test versions of NGINX, Apache and MongoDB #33789
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
38b7077
Update test versions of NGINX, Apache and MongoDB
rdner 3ab1de6
Add retries to Logstash tests because they are flaky
rdner 075e60f
Do not install mage v1.14.0
rdner 4048b65
Update elastic-agent-client version to avoid broken agent dependency
rdner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
ARG APACHE_VERSION=${APACHE_VERSION} | ||
FROM httpd:$APACHE_VERSION | ||
RUN sed -i "/jessie-updates/d" /etc/apt/sources.list | ||
RUN apt-get update && apt-get install -y curl | ||
RUN apt update && yes | apt install curl | ||
HEALTHCHECK --interval=1s --retries=90 CMD curl -f http://localhost | ||
COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ Listen 80 | |
# Example: | ||
# LoadModule foo_module modules/mod_foo.so | ||
# | ||
LoadModule mpm_event_module modules/mod_mpm_event.so | ||
LoadModule authn_file_module modules/mod_authn_file.so | ||
#LoadModule authn_dbm_module modules/mod_authn_dbm.so | ||
#LoadModule authn_anon_module modules/mod_authn_anon.so | ||
|
@@ -190,7 +191,7 @@ ServerAdmin [email protected] | |
# | ||
# If your host doesn't have a registered DNS name, enter its IP address here. | ||
# | ||
#ServerName www.example.com:80 | ||
ServerName localhost | ||
|
||
# | ||
# Deny access to the entirety of your server's filesystem. You must | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# all the versions have to be the valid semantic version syntax x.x.x | ||
# because of the test check for comparing against older field structure | ||
variants: | ||
- APACHE_VERSION: 2.4.12 | ||
- APACHE_VERSION: 2.4.20 | ||
- APACHE_VERSION: "2.4.54" | ||
- APACHE_VERSION: "2.4.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
version: '2.3' | ||
version: "2.3" | ||
|
||
services: | ||
apache: | ||
image: docker.elastic.co/integrations-ci/beats-apache:${APACHE_VERSION:-2.4.20}-1 | ||
image: docker.elastic.co/integrations-ci/beats-apache:${APACHE_VERSION:-2.4.54}-1 | ||
build: | ||
context: ./_meta | ||
args: | ||
APACHE_VERSION: ${APACHE_VERSION:-2.4.20} | ||
APACHE_VERSION: "${APACHE_VERSION:-2.4.54}" | ||
ports: | ||
- 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,12 @@ import ( | |
"io/ioutil" | ||
"net/http" | ||
"testing" | ||
"time" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/elastic/beats/v7/libbeat/tests/compose" | ||
"github.com/elastic/beats/v7/metricbeat/mb" | ||
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" | ||
"github.com/elastic/beats/v7/metricbeat/module/logstash" | ||
_ "github.com/elastic/beats/v7/metricbeat/module/logstash/node" | ||
|
@@ -47,7 +49,15 @@ func TestFetch(t *testing.T) { | |
t.Run(metricSet, func(t *testing.T) { | ||
config := getConfig(metricSet, service.Host()) | ||
f := mbtest.NewReportingMetricSetV2Error(t, config) | ||
events, errs := mbtest.ReportingFetchV2Error(f) | ||
var ( | ||
events []mb.Event | ||
errs []error | ||
) | ||
|
||
require.Eventually(t, func() bool { | ||
events, errs = mbtest.ReportingFetchV2Error(f) | ||
return len(events) > 0 && len(errs) == 0 | ||
}, 30*time.Second, time.Second, "events cannot be empty: %v, %v", events, errs) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test was flaky, sometimes Logstash returns 0 events the first time around. |
||
|
||
require.Empty(t, errs) | ||
require.NotEmpty(t, events) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
ARG MONGODB_VERSION | ||
FROM mongo:${MONGODB_VERSION} | ||
RUN sed -i "/jessie-updates/d" /etc/apt/sources.list | ||
RUN apt-get update && apt-get install -y netcat | ||
RUN apt update && yes | apt install netcat | ||
HEALTHCHECK --interval=1s --retries=90 CMD nc -z localhost 27017 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
version: '2.3' | ||
version: "2.3" | ||
|
||
services: | ||
mongodb: | ||
image: docker.elastic.co/integrations-ci/beats-mongodb:${MONGODB_VERSION:-3.4}-1 | ||
build: | ||
context: ./_meta | ||
args: | ||
MONGODB_VERSION: ${MONGODB_VERSION:-3.4} | ||
MONGODB_VERSION: "${MONGODB_VERSION:-3.4}" | ||
command: mongod --replSet beats | ||
ports: | ||
- 27017 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
ARG NGINX_VERSION | ||
FROM nginx:${NGINX_VERSION} | ||
RUN sed -i "/jessie-updates/d" /etc/apt/sources.list | ||
RUN apt-get update && apt-get install -y curl | ||
RUN apt update && apt install -y curl | ||
HEALTHCHECK --interval=1s --retries=90 CMD curl -f http://localhost/nginx_status | ||
COPY ./nginx.conf /etc/nginx/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
version: '2.3' | ||
version: "2.3" | ||
|
||
services: | ||
nginx: | ||
image: docker.elastic.co/integrations-ci/beats-nginx:${NGINX_VERSION:-1.9}-1 | ||
build: | ||
image: docker.elastic.co/integrations-ci/beats-nginx:${NGINX_VERSION:-1.23.2}-1 | ||
build: | ||
context: ./_meta | ||
args: | ||
NGINX_VERSION: ${NGINX_VERSION:-1.9} | ||
NGINX_VERSION: "${NGINX_VERSION:-1.23.2}" | ||
ports: | ||
- 80 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is different on purpose.
yes |
also allows to install packages without authentication in case of expired keys. The keys in Jessie are expired at the moment and we need this Debian version for testing old log format for httpd <= 2.4.12. So either we have to update the keys as one of the steps or just accept the prompt to install without authentication.