Skip to content

Conversation

@andrewkroh
Copy link
Member

When calling POST /api/fleet/package_policies for packages that
containing multiple policy_templates, the name of the policy_template
associated to the input under test should be specified.

If the policy_template is not specified then Kibana will default to
the first policy_template which may not contain the input or may
not contain the expected package level variables for the test.

This affected testing packages like AWS.

The error that this fixes is:

Error: error running package system tests: could not complete test run:
could not add data stream config to policy: could not add package to policy;
API status code = 500; response body = {"statusCode":500,
"error":"Internal Server Error","message":"Input template not found, unable
to find input type logfile"}

Fixes #899

@andrewkroh andrewkroh added the bug Something isn't working label Jul 21, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 21, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-10-04T16:17:11.354+0000

  • Duration: 35 min 31 sec

Test stats 🧪

Test Results
Failed 0
Passed 837
Skipped 0
Total 837

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@andrewkroh andrewkroh force-pushed the bugfix/pass-policy-template-system-tests branch from 04cca09 to ed264b7 Compare July 21, 2022 12:45
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 21, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (35/35) 💚
Files 65.891% (85/129) 👎 -0.25
Classes 60.87% (112/184) 👎 -0.242
Methods 47.306% (360/761) 👎 -1.464
Lines 30.528% (3246/10633) 👎 -1.569
Conditionals 100.0% (0/0) 💚

@andrewkroh andrewkroh force-pushed the bugfix/pass-policy-template-system-tests branch from ed264b7 to 61e6e5c Compare July 21, 2022 15:15
@andrewkroh andrewkroh marked this pull request as ready for review July 21, 2022 16:01
@mtojek mtojek requested a review from a team July 26, 2022 14:02
When calling `POST /api/fleet/package_policies` for packages that
containing multiple policy_templates, the name of the policy_template
associated to the input under test should be specified.

If the policy_template is not specified then Kibana will default to
the first policy_template which may not contain the input or may
not contain the expected package level variables for the test.

This affected testing packages like AWS.

The error that this fixes is:

    Error: error running package system tests: could not complete test run:
    could not add data stream config to policy: could not add package to policy;
    API status code = 500; response body = {"statusCode":500,
    "error":"Internal Server Error","message":"Input template not found, unable
    to find input type logfile"}

Fixes elastic#899
@andrewkroh andrewkroh force-pushed the bugfix/pass-policy-template-system-tests branch from 61e6e5c to bdfe548 Compare August 24, 2022 14:03
@jsoriano
Copy link
Member

/test

@jsoriano
Copy link
Member

jsoriano commented Oct 4, 2022

@andrewkroh sorry for the late review, can you please take a look to the merge conflicts? Thanks!

@andrewkroh
Copy link
Member Author

Conflicts addressed. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System tests fail in packages using policy_templates

3 participants