Skip to content
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

Enable CM integration tests #9625

Merged
merged 1 commit into from
Jan 14, 2019
Merged

Enable CM integration tests #9625

merged 1 commit into from
Jan 14, 2019

Conversation

ph
Copy link
Contributor

@ph ph commented Dec 18, 2018

A few things broke the integration tests, change in response and also
now Kibana also blacklist some elements.

I have removed the blacklisted integration tests, theses are tested
using unit tests, because kibana will not return anything that is
blacklisted.

I've moved the integration tests away from using the file output because
it its blacklisted, instead we now use the Elasticsearch output to do
the assertions.

Fixes: #9597

@ph ph added in progress Pull request is currently in progress. Management labels Dec 18, 2018
@ph ph requested a review from a team as a code owner December 18, 2018 15:43
@ph ph added :Testing review and removed review in progress Pull request is currently in progress. labels Dec 18, 2018
@ph
Copy link
Contributor Author

ph commented Dec 19, 2018

We can't merge it yet, the 7.0 snapshot doesn't contains the fix

@urso
Copy link

urso commented Dec 21, 2018

The reenabled tests seem to be broken on Travis.

@ph ph added needs_backport PR is waiting to be backported to other branches. in progress Pull request is currently in progress. and removed review labels Jan 7, 2019
@ph ph added review and removed in progress Pull request is currently in progress. labels Jan 7, 2019
@ph
Copy link
Contributor Author

ph commented Jan 7, 2019

@urso I've removed the in progress label from this PR and I have fixed the assertions for CM, this will need to be merged in master, 6.x, 6.5 and 6.6.

c := defaultConfig()
v, _ := c.Blacklist.Patterns["output"]
assert.Equal(t, "console|file", v)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a sanity check to make sure we do not changes the default.

@ph ph changed the title Revert "Disable Central Management tests (#9599)" Enable CM integration tests Jan 7, 2019
@ph ph assigned urso Jan 7, 2019
@ph
Copy link
Contributor Author

ph commented Jan 7, 2019

I think this PR elastic/kibana#27717 might impact how we create the test data in the integration suite.

@urso
Copy link

urso commented Jan 8, 2019

The failing tests are unrelated and fixed in master

@ph
Copy link
Contributor Author

ph commented Jan 9, 2019

I didn't merge this, I was able to make it fails periodically, works fine from time to time on travis, works always on local machine. I have added debug statements and I know that something is wrong with the enroll token.

Error creating a new enrollment token: Not Found

I think its either that when we call the Kibana API it fails to create the token or the system is not stable enough when we do the call and we do not track any errors states.. I am adding a more robust test.

@ph ph added the in progress Pull request is currently in progress. label Jan 9, 2019
@ph ph closed this Jan 9, 2019
@ph ph reopened this Jan 9, 2019
@ph
Copy link
Contributor Author

ph commented Jan 9, 2019

I've added log statement to this PR to get the kibana status error, I've also marked it as in progress so we do not merge it.

It appear that we hit a bug on the kibana side.

@ph
Copy link
Contributor Author

ph commented Jan 11, 2019

Rebased and checking if we get a more meaningful error with elastic/kibana#28541 in Kibana.

A few things broke the integration tests, change in response and also
now Kibana also blacklist some elements.

I have removed the blacklisted integration tests, theses are tested
using unit tests, because kibana will not return anything that is
blacklisted.

I've moved the integration tests away from using the file output because
it its blacklisted, instead we now use the Elasticsearch output to do
the assertions.
@ph
Copy link
Contributor Author

ph commented Jan 11, 2019

So I was able to get a few run green with the integration test, so I've removed the debug and squash everything up.

@ph ph merged commit e46c773 into elastic:master Jan 14, 2019
ph added a commit to ph/beats that referenced this pull request Jan 14, 2019
A few things broke the integration tests, change in response and also
now Kibana also blacklist some elements.

I have removed the blacklisted integration tests, theses are tested
using unit tests, because kibana will not return anything that is
blacklisted.

I've moved the integration tests away from using the file output because
it its blacklisted, instead we now use the Elasticsearch output to do
the assertions.

(cherry picked from commit e46c773)
@ph ph added v6.6.0 and removed needs_backport PR is waiting to be backported to other branches. labels Jan 14, 2019
ph added a commit to ph/beats that referenced this pull request Jan 14, 2019
A few things broke the integration tests, change in response and also
now Kibana also blacklist some elements.

I have removed the blacklisted integration tests, theses are tested
using unit tests, because kibana will not return anything that is
blacklisted.

I've moved the integration tests away from using the file output because
it its blacklisted, instead we now use the Elasticsearch output to do
the assertions.

(cherry picked from commit e46c773)
@ph ph added the v6.7.0 label Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants