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

[7.17](backport #37212) Replace EOL modules: github.com/golang/protobuf by google.golang.org/protobuf #37469

Merged
merged 21 commits into from
Jan 5, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 20, 2023

This is an automatic backport of pull request #37212 done by Mergify.
Cherry-pick of b59a8f4 has failed:

On branch mergify/bp/7.17/pr-37212
Your branch is up to date with 'origin/7.17'.

You are currently cherry-picking commit b59a8f4769.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   NOTICE.txt
	both modified:   go.mod
	both modified:   x-pack/functionbeat/provider/aws/aws/kinesis_test.go
	both modified:   x-pack/functionbeat/provider/aws/aws/transformer/transformer_test.go
	deleted by us:   x-pack/metricbeat/module/gcp/metrics/cloudsql/metadata_test.go
	both modified:   x-pack/metricbeat/module/gcp/metrics/compute/metadata_test.go
	both modified:   x-pack/metricbeat/module/gcp/metrics/metrics_requester.go
	both modified:   x-pack/metricbeat/module/gcp/metrics/metrics_requester_test.go
	both modified:   x-pack/metricbeat/module/gcp/metrics/metricset.go
	deleted by us:   x-pack/metricbeat/module/gcp/metrics/redis/metadata_test.go

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…protobuf (#37212)

(cherry picked from commit b59a8f4)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	x-pack/functionbeat/provider/aws/aws/kinesis_test.go
#	x-pack/functionbeat/provider/aws/aws/transformer/transformer_test.go
#	x-pack/metricbeat/module/gcp/metrics/cloudsql/metadata_test.go
#	x-pack/metricbeat/module/gcp/metrics/compute/metadata_test.go
#	x-pack/metricbeat/module/gcp/metrics/metrics_requester.go
#	x-pack/metricbeat/module/gcp/metrics/metrics_requester_test.go
#	x-pack/metricbeat/module/gcp/metrics/metricset.go
#	x-pack/metricbeat/module/gcp/metrics/redis/metadata_test.go
@mergify mergify bot requested review from a team as code owners December 20, 2023 10:38
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Dec 20, 2023
@mergify mergify bot requested review from faec and leehinman and removed request for a team December 20, 2023 10:38
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 20, 2023
@elasticmachine
Copy link
Collaborator

💔 Build Failed

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: 2023-12-20T10:38:26.722+0000

  • Duration: 7 min 34 sec

Steps errors 1

Expand to view the steps failures

Shell Script
  • Took 0 min 7 sec . View more details here
  • Description: HOME=/var/lib/jenkins/workspace/Beats_beats_PR-37469 GO_VERSION=1.20.12 ./dev-tools/run_with_go_ver make test-mage

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@pierrehilbert pierrehilbert requested review from AndersonQ and removed request for faec and leehinman December 20, 2023 11:25
@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Dec 20, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 20, 2023
@elasticmachine
Copy link
Collaborator

💔 Build Failed

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: 2023-12-21T13:17:17.596+0000

  • Duration: 7 min 48 sec

Steps errors 1

Expand to view the steps failures

Shell Script
  • Took 0 min 8 sec . View more details here
  • Description: HOME=/var/lib/jenkins/workspace/Beats_beats_PR-37469 GO_VERSION=1.20.12 ./dev-tools/run_with_go_ver make test-mage

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 6 min 27 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

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

Expand to view the summary

Build stats

  • Start Time: 2023-12-21T14:09:04.002+0000

  • Duration: 5 min 28 sec

Steps errors 1

Expand to view the steps failures

Error signal
  • Took 0 min 0 sec . View more details here
  • Description: tar: step failed with error null

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 6 min 33 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

💔 Build Failed

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

  • Duration: 27 min 47 sec

Pipeline error 1

This error is likely related to the pipeline itself. Click here
and then you will see the error (either incorrect syntax or an invalid configuration).

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor Author

mergify bot commented Dec 25, 2023

This pull request has not been merged yet. Could you please review and merge it @AndersonQ? 🙏

@AndersonQ AndersonQ removed the conflicts There is a conflict in the backported pull request label Dec 27, 2023
@elasticmachine
Copy link
Collaborator

💔 Build Failed

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

  • Duration: 72 min 6 sec

Pipeline error 1

This error is likely related to the pipeline itself. Click here
and then you will see the error (either incorrect syntax or an invalid configuration).

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

those tests test code that does not exists in this branch
@elasticmachine
Copy link
Collaborator

💔 Build Failed

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: 2023-12-28T09:50:19.002+0000

  • Duration: 72 min 37 sec

Test stats 🧪

Test Results
Failed 0
Passed 21404
Skipped 1333
Total 22737

Steps errors 14

Expand to view the steps failures

Show only the first 10 steps failures

x-pack/metricbeat-goIntegTest - mage goIntegTest
  • Took 3 min 31 sec . View more details here
  • Description: mage goIntegTest
x-pack/metricbeat-goIntegTest - mage goIntegTest
  • Took 0 min 22 sec . View more details here
  • Description: mage goIntegTest
x-pack/metricbeat-goIntegTest - mage goIntegTest
  • Took 0 min 22 sec . View more details here
  • Description: mage goIntegTest
x-pack/metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 4 min 43 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 1 min 30 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 0 min 30 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/metricbeat-windows-windows-2019 - mage build unitTest
  • Took 3 min 43 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-windows-2019 - mage build unitTest
  • Took 0 min 27 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-windows-2019 - mage build unitTest
  • Took 0 min 16 sec . View more details here
  • Description: mage build unitTest
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 1'

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@AndersonQ AndersonQ force-pushed the mergify/bp/7.17/pr-37212 branch from 562041b to dc51ae8 Compare December 28, 2023 16:43
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 6 min 45 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 19 min 34 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 52 min 46 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

💔 Build Failed

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

  • Duration: 77 min 31 sec

Pipeline error 1

This error is likely related to the pipeline itself. Click here
and then you will see the error (either incorrect syntax or an invalid configuration).

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

💔 Build Failed

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: 2023-12-28T18:45:37.619+0000

  • Duration: 73 min 47 sec

Test stats 🧪

Test Results
Failed 0
Passed 22030
Skipped 1393
Total 23423

Steps errors 2

Expand to view the steps failures

x-pack/filebeat-windows-windows-2019 - mage build unitTest
  • Took 4 min 20 sec . View more details here
  • Description: mage build unitTest
Google Storage Download
  • Took 0 min 6 sec . View more details here
  • Description: [2023-12-28T19:17:27.827Z] [Google Cloud Storage Plugin] Found 1 files to download from pattern: gs:

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor Author

mergify bot commented Jan 1, 2024

This pull request has not been merged yet. Could you please review and merge it @AndersonQ? 🙏

@mergify mergify bot requested a review from a team as a code owner January 2, 2024 15:51
@elasticmachine
Copy link
Collaborator

💔 Tests Failed

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: 2024-01-02T15:52:04.216+0000

  • Duration: 147 min 57 sec

Test stats 🧪

Test Results
Failed 11
Passed 22178
Skipped 1395
Total 23584

Test errors 11

Expand to view the tests failures

> Show only the first 10 test failures

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_303_cisco – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['event.start']": {'new_value': '2024-05-05T19:51:17.000Z', 'old_value': '2023-05-05T19:51:17.000Z'}, "root['event.end']": {'new_value': '2024-05-05T17:51:17.000-02:00', 'old_value': '2023-05-05T17:51:17.000-02:00'}}}, full object: 
      {'log.offset': 466, 'log.level': 'debug', 'source.address': '192.168.2.2', 'source.ip': '192.168.2.2', 'fileset.name': 'asa', 'tags': ['cisco-asa', 'forwarded'], 'input.type': 'log', 'observer.ingress.interface.name': 'net', 'observer.hostname': 'dev01', 'observer.product': 'asa', 'observer.vendor': 'Cisco', 'observer.type': 'firewall', 'related.hosts': ['dev01'], 'related.ip': ['192.168.2.2'], 'service.type': 'cisco', 'host.hostname': 'dev01', 'event.severity': 7, 'event.code': 609002, 'event.original': '%FTD-7-609002: Teardown local-host net:192.168.2.2 duration 0:00:00', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cisco', 'event.start': '2024-05-05T19:51:17.000Z', 'event.type': ['connection', 'end'], 'event.duration': 0, 'event.action': 'flow-expiration', 'event.end': '2024-05-05T17:51:17.000-02:00', 'event.category': ['network'], 'event.dataset': 'cisco.asa', 'cisco.asa.source_interface': 'net', 'cisco.asa.message_id': '609002'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['event.start']": {'new_value': '2024-05-05T19:51:17.000Z', 'old_value': '2023-05-05T19:51:17...'}, "root['event.end']": {'new_value': '2024-05-05T17:51:17.000-02:00', 'old_value': '2023-05-05T17:51:17.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_303_cisco>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_303_cisco>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cisco/asa/test/additional_messages.log'
    objects = [{'@timestamp': '2024-05-05T17:51:17.000-02:00', 'agent': {'ephemeral_id': '7edade51-6946-4183-997c-15e9a9c5943c', 'ho...ce_ip': '8.8.8.8', 'message_id': '302020'}}, 'destination': {'address': '10.10.10.10', 'ip': '10.10.10.10'}, ...}, ...]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['event.start']": {'new_value': '2024-05-05T19:51:17.000Z', 'old_value': '2023-05-05T19:51:17.000Z'}, "root['event.end']": {'new_value': '2024-05-05T17:51:17.000-02:00', 'old_value': '2023-05-05T17:51:17.000-02:00'}}}, full object: 
    E             {'log.offset': 466, 'log.level': 'debug', 'source.address': '192.168.2.2', 'source.ip': '192.168.2.2', 'fileset.name': 'asa', 'tags': ['cisco-asa', 'forwarded'], 'input.type': 'log', 'observer.ingress.interface.name': 'net', 'observer.hostname': 'dev01', 'observer.product': 'asa', 'observer.vendor': 'Cisco', 'observer.type': 'firewall', 'related.hosts': ['dev01'], 'related.ip': ['192.168.2.2'], 'service.type': 'cisco', 'host.hostname': 'dev01', 'event.severity': 7, 'event.code': 609002, 'event.original': '%FTD-7-609002: Teardown local-host net:192.168.2.2 duration 0:00:00', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cisco', 'event.start': '2024-05-05T19:51:17.000Z', 'event.type': ['connection', 'end'], 'event.duration': 0, 'event.action': 'flow-expiration', 'event.end': '2024-05-05T17:51:17.000-02:00', 'event.category': ['network'], 'event.dataset': 'cisco.asa', 'cisco.asa.source_interface': 'net', 'cisco.asa.message_id': '609002'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['event.start']": {'new_value': '2024-05-05T19:51:17.000Z', 'old_value': '2023-05-05T19:51:17...'}, "root['event.end']": {'new_value': '2024-05-05T17:51:17.000-02:00', 'old_value': '2023-05-05T17:51:17.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_314_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}}, full object: 
      {'log.offset': 580, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:32:56.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor FW rules start', 'cyberarkpas.audit.message': 'Monitor FW rules start', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor FW rules start', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '357', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor fw rules start', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_314_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_314_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/357_monitor_fw_rules_start.log'
    objects = [{'@timestamp': '2021-03-04T19:10:01.000Z', 'agent': {'ephemeral_id': '428d8691-798e-4502-a605-b9535871ebff', 'hostnam...tor FW rules start', 'issuer': 'Batch', 'message': 'Monitor FW rules start', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}}, full object: 
    E             {'log.offset': 580, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:32:56.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor FW rules start', 'cyberarkpas.audit.message': 'Monitor FW rules start', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor FW rules start', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '357', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor fw rules start', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_322_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:10:31.000-02:00', 'old_value': '2023-03-08T03:10:31.000-02:00'}}}, full object: 
      {'log.offset': 604, 'source.address': '10.0.1.20', 'source.ip': '10.0.1.20', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T03:10:31.000-02:00', 'related.ip': ['10.0.1.20'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.safe': 'PasswordManager_workspace', 'cyberarkpas.audit.station': '10.0.1.20', 'cyberarkpas.audit.action': 'Clear Safe History', 'cyberarkpas.audit.message': 'Clear Safe History', 'cyberarkpas.audit.issuer': 'PasswordManager', 'cyberarkpas.audit.desc': 'Clear Safe History', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '59', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'clear safe history', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:10:31.000-02:00', 'old_value': '2023-03-08T03:10:31.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_322_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_322_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/59_clear_safe_history.log'
    objects = [{'@timestamp': '2021-03-04T19:25:02.000Z', 'agent': {'ephemeral_id': '0bff803d-6f5d-4fe9-9b66-0ee692375459', 'hostnam...r Safe History', 'iso_timestamp': '2021-03-09T09:00:47Z', 'issuer': 'Batch', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:10:31.000-02:00', 'old_value': '2023-03-08T03:10:31.000-02:00'}}}, full object: 
    E             {'log.offset': 604, 'source.address': '10.0.1.20', 'source.ip': '10.0.1.20', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T03:10:31.000-02:00', 'related.ip': ['10.0.1.20'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.safe': 'PasswordManager_workspace', 'cyberarkpas.audit.station': '10.0.1.20', 'cyberarkpas.audit.action': 'Clear Safe History', 'cyberarkpas.audit.message': 'Clear Safe History', 'cyberarkpas.audit.issuer': 'PasswordManager', 'cyberarkpas.audit.desc': 'Clear Safe History', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '59', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'clear safe history', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:10:31.000-02:00', 'old_value': '2023-03-08T03:10:31.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_334_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}}, full object: 
      {'log.offset': 598, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:48:07.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor DR Replication start', 'cyberarkpas.audit.message': 'Monitor DR Replication start', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor DR Replication start', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '310', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor dr replication start', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_334_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_334_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/310_monitor_dr_replication_start.log'
    objects = [{'@timestamp': '2021-03-04T19:10:01.000Z', 'agent': {'ephemeral_id': 'e6b24674-f219-4754-84ff-2d89ae8e0c98', 'hostnam...cation start', 'issuer': 'Batch', 'message': 'Monitor DR Replication start', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}}, full object: 
    E             {'log.offset': 598, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:48:07.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor DR Replication start', 'cyberarkpas.audit.message': 'Monitor DR Replication start', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor DR Replication start', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '310', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor dr replication start', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_341_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}}, full object: 
      {'log.offset': 574, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:32:56.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor FW Rules end', 'cyberarkpas.audit.message': 'Monitor FW Rules end', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor FW Rules end', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '358', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor fw rules end', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_341_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_341_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/358_monitor_fw_rules_end.log'
    objects = [{'@timestamp': '2021-03-04T19:10:01.000Z', 'agent': {'ephemeral_id': '898e6bb6-7343-4dd0-b79c-2fcf991fb5a8', 'hostnam...Monitor FW Rules end', 'issuer': 'Batch', 'message': 'Monitor FW Rules end', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}}, full object: 
    E             {'log.offset': 574, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:32:56.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor FW Rules end', 'cyberarkpas.audit.message': 'Monitor FW Rules end', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor FW Rules end', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '358', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor fw rules end', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:32:56.000-02:00', 'old_value': '2023-03-08T02:32:56.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_344_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T07:46:54.000-02:00', 'old_value': '2023-03-08T07:46:54.000-02:00'}}}, full object: 
      {'log.offset': 760, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T07:46:54.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Error', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Security warning - The Signature Hash Algorithm of the Vault certificate is SHA1.', 'cyberarkpas.audit.message': 'Security warning - The Signature Hash Algorithm of the Vault certificate is SHA1.', 'cyberarkpas.audit.issuer': 'Builtin', 'cyberarkpas.audit.desc': 'Security warning - The Signature Hash Algorithm of the Vault certificate is SHA1.', 'host.name': 'VAULT', 'event.severity': 7, 'event.code': '479', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'security warning - the signature hash algorithm of the vault certificate is sha1.', 'event.type': 'error', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T07:46:54.000-02:00', 'old_value': '2023-03-08T07:46:54.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_344_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_344_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/479_security_warning_the_signature_hash_algorithm_of_the_vault_certificate_is_sha1.log'
    objects = [{'@timestamp': '2021-03-04T19:10:01.000Z', 'agent': {'ephemeral_id': 'f7a668c7-1553-415c-85a9-c3710bc6161e', 'hostnam...y warning - The Signature Hash Algorithm of the Vault certificate is SHA1.', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T07:46:54.000-02:00', 'old_value': '2023-03-08T07:46:54.000-02:00'}}}, full object: 
    E             {'log.offset': 760, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T07:46:54.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Error', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Security warning - The Signature Hash Algorithm of the Vault certificate is SHA1.', 'cyberarkpas.audit.message': 'Security warning - The Signature Hash Algorithm of the Vault certificate is SHA1.', 'cyberarkpas.audit.issuer': 'Builtin', 'cyberarkpas.audit.desc': 'Security warning - The Signature Hash Algorithm of the Vault certificate is SHA1.', 'host.name': 'VAULT', 'event.severity': 7, 'event.code': '479', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'security warning - the signature hash algorithm of the vault certificate is sha1.', 'event.type': 'error', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T07:46:54.000-02:00', 'old_value': '2023-03-08T07:46:54.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_355_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:41:01.000-02:00', 'old_value': '2023-03-08T03:41:01.000-02:00'}}}, full object: 
      {'log.offset': 0, 'source.address': '10.0.1.20', 'source.ip': '10.0.1.20', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T03:41:01.000-02:00', 'file.path': 'Root\\Policies\\Policy-BusinessWebsite.ini', 'related.ip': ['10.0.1.20'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.message': 'Retrieve File', 'cyberarkpas.audit.issuer': 'PasswordManager', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.file': 'Root\\Policies\\Policy-BusinessWebsite.ini', 'cyberarkpas.audit.safe': 'PasswordManagerShared', 'cyberarkpas.audit.station': '10.0.1.20', 'cyberarkpas.audit.action': 'Retrieve File', 'cyberarkpas.audit.desc': 'Retrieve File', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '51', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'retrieve file', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:41:01.000-02:00', 'old_value': '2023-03-08T03:41:01.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_355_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_355_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/legacysyslog.log'
    objects = [{'@timestamp': '2024-03-08T03:41:01.000-02:00', 'agent': {'ephemeral_id': '2d6ebad4-12cb-4047-bcec-6f917a3a93aa', 'ho...: 'Root\\Policies\\Policy-BusinessWebsite.ini', 'issuer': 'PasswordManager', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:41:01.000-02:00', 'old_value': '2023-03-08T03:41:01.000-02:00'}}}, full object: 
    E             {'log.offset': 0, 'source.address': '10.0.1.20', 'source.ip': '10.0.1.20', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T03:41:01.000-02:00', 'file.path': 'Root\\Policies\\Policy-BusinessWebsite.ini', 'related.ip': ['10.0.1.20'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.message': 'Retrieve File', 'cyberarkpas.audit.issuer': 'PasswordManager', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.file': 'Root\\Policies\\Policy-BusinessWebsite.ini', 'cyberarkpas.audit.safe': 'PasswordManagerShared', 'cyberarkpas.audit.station': '10.0.1.20', 'cyberarkpas.audit.action': 'Retrieve File', 'cyberarkpas.audit.desc': 'Retrieve File', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '51', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'retrieve file', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:41:01.000-02:00', 'old_value': '2023-03-08T03:41:01.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_360_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}}, full object: 
      {'log.offset': 592, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:48:07.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor DR Replication end', 'cyberarkpas.audit.message': 'Monitor DR Replication end', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor DR Replication end', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '311', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor dr replication end', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_360_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_360_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/311_monitor_dr_replication_end.log'
    objects = [{'@timestamp': '2021-03-04T19:10:01.000Z', 'agent': {'ephemeral_id': '6934347c-033a-4850-97b8-85440f22b426', 'hostnam...eplication end', 'issuer': 'Batch', 'message': 'Monitor DR Replication end', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}}, full object: 
    E             {'log.offset': 592, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:48:07.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Monitor DR Replication end', 'cyberarkpas.audit.message': 'Monitor DR Replication end', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Monitor DR Replication end', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '311', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'monitor dr replication end', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:48:07.000-02:00', 'old_value': '2023-03-08T02:48:07.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_362_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:54:46.000-02:00', 'old_value': '2023-03-08T02:54:46.000-02:00'}}}, full object: 
      {'log.offset': 1113, 'source.address': '10.0.1.20', 'source.ip': '10.0.1.20', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:54:46.000-02:00', 'related.ip': ['10.0.1.20'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '10.0.1.20', 'cyberarkpas.audit.action': 'Set Password', 'cyberarkpas.audit.message': 'Set Password', 'cyberarkpas.audit.issuer': 'PVWAGWUser', 'cyberarkpas.audit.desc': 'Set Password', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '88', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'set password', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:54:46.000-02:00', 'old_value': '2023-03-08T02:54:46.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_362_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_362_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/88_set_password.log'
    objects = [{'@timestamp': '2021-03-04T19:16:19.000Z', 'agent': {'ephemeral_id': 'b916b817-2777-4f84-9f2c-1fb579fc0d4c', 'hostnam...mp': '2021-03-10T09:11:52Z', 'issuer': 'PSMPApp_localhost.localdomain', ...}}, 'ecs': {'version': '1.12.0'}, ...}, ...]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:54:46.000-02:00', 'old_value': '2023-03-08T02:54:46.000-02:00'}}}, full object: 
    E             {'log.offset': 1113, 'source.address': '10.0.1.20', 'source.ip': '10.0.1.20', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T02:54:46.000-02:00', 'related.ip': ['10.0.1.20'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '10.0.1.20', 'cyberarkpas.audit.action': 'Set Password', 'cyberarkpas.audit.message': 'Set Password', 'cyberarkpas.audit.issuer': 'PVWAGWUser', 'cyberarkpas.audit.desc': 'Set Password', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '88', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'set password', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T02:54:46.000-02:00', 'old_value': '2023-03-08T02:54:46.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_363_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
    Expand to view the error details

     AssertionError: The following expected object doesn't match:
       Diff:
      {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:00:20.000-02:00', 'old_value': '2023-03-08T03:00:20.000-02:00'}}}, full object: 
      {'log.offset': 598, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T03:00:20.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Auto Clear Users History end', 'cyberarkpas.audit.message': 'Auto Clear Users History end', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Auto Clear Users History end', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '289', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'auto clear users history end', 'event.dataset': 'cyberarkpas.audit'}
    assert 1 == 0
     +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:00:20.000-02:00', 'old_value': '2023-03-08T03:00:20.000-02:00'}}}) 
    

    Expand to view the stacktrace

     a = (<test_xpack_modules.XPackTest testMethod=test_fileset_file_363_cyberarkpas>,)
    
        @wraps(func)
        def standalone_func(*a):
    >       return func(*(a + p.args), **p.kwargs)
    
    /opt/venv/lib/python3.11/site-packages/parameterized/parameterized.py:518: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../../filebeat/tests/system/test_modules.py:95: in test_fileset_file
        self.run_on_file(
    ../../filebeat/tests/system/test_modules.py:185: in run_on_file
        self._test_expected_events(test_file, objects)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_xpack_modules.XPackTest testMethod=test_fileset_file_363_cyberarkpas>
    test_file = '/go/src/github.com/elastic/beats/x-pack/filebeat/module/cyberarkpas/audit/test/289_auto_clear_users_history_end.log'
    objects = [{'@timestamp': '2021-03-05T11:00:06.000Z', 'agent': {'ephemeral_id': '7a221796-b8fa-41b7-ba23-6486cbd99409', 'hostnam... History end', 'issuer': 'Batch', 'message': 'Auto Clear Users History end', ...}}, 'ecs': {'version': '1.12.0'}, ...}]
    
        def _test_expected_events(self, test_file, objects):
        
            # Generate expected files if GENERATE env variable is set
            if os.getenv("GENERATE"):
                with open(test_file + "-expected.json", 'w') as f:
                    # Flatten an cleanup objects
                    # This makes sure when generated on different machines / version the expected.json stays the same.
                    for k, obj in enumerate(objects):
                        objects[k] = self.flatten_object(obj, {}, "")
                        clean_keys(objects[k])
                        for key in objects[k].keys():
                            if isinstance(objects[k][key], list):
                                objects[k][key].sort(key=str)
        
                    json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)
        
            with open(test_file + "-expected.json", "r") as f:
                expected = json.load(f)
        
            assert len(expected) == len(objects), "expected {} events to compare but got {}".format(
                len(expected), len(objects))
        
            # Do not perform a comparison between the resulting and expected documents
            # if the TESTING_FILEBEAT_SKIP_DIFF flag is set.
            #
            # This allows to run a basic check with older versions of ES that can lead
            # to slightly different documents without maintaining multiple sets of
            # golden files.
            if os.getenv("TESTING_FILEBEAT_SKIP_DIFF"):
                return
        
            for idx in range(len(expected)):
                ev = expected[idx]
                obj = objects[idx]
        
                # Flatten objects for easier comparing
                obj = self.flatten_object(obj, {}, "")
                clean_keys(obj)
                clean_keys(ev)
        
                d = DeepDiff(ev, obj, ignore_order=True)
        
    >           assert len(d) == 0, "The following expected object doesn't match:\n Diff:\n{}, full object: \n{}".format(d, obj)
    E           AssertionError: The following expected object doesn't match:
    E              Diff:
    E             {'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:00:20.000-02:00', 'old_value': '2023-03-08T03:00:20.000-02:00'}}}, full object: 
    E             {'log.offset': 598, 'source.address': '0.0.0.0', 'source.ip': '0.0.0.0', 'fileset.name': 'audit', 'tags': ['cyberarkpas.audit', 'forwarded'], 'input.type': 'log', 'observer.product': 'Vault', 'observer.hostname': 'VAULT', 'observer.vendor': 'Cyber-Ark', 'observer.version': '11.7.0000', '@timestamp': '2024-03-08T03:00:20.000-02:00', 'related.ip': ['0.0.0.0'], 'service.type': 'cyberarkpas', 'cyberarkpas.audit.rfc5424': False, 'cyberarkpas.audit.severity': 'Info', 'cyberarkpas.audit.station': '0.0.0.0', 'cyberarkpas.audit.action': 'Auto Clear Users History end', 'cyberarkpas.audit.message': 'Auto Clear Users History end', 'cyberarkpas.audit.issuer': 'Batch', 'cyberarkpas.audit.desc': 'Auto Clear Users History end', 'host.name': 'VAULT', 'event.severity': 2, 'event.code': '289', 'event.timezone': '-02:00', 'event.kind': 'event', 'event.module': 'cyberarkpas', 'event.action': 'auto clear users history end', 'event.dataset': 'cyberarkpas.audit'}
    E           assert 1 == 0
    E            +  where 1 = len({'values_changed': {"root['@timestamp']": {'new_value': '2024-03-08T03:00:20.000-02:00', 'old_value': '2023-03-08T03:00:20.000-02:00'}}})
    
    ../../filebeat/tests/system/test_modules.py:229: AssertionError 
    

Steps errors 5

Expand to view the steps failures

filebeat-pythonIntegTest - mage pythonIntegTest
  • Took 13 min 25 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/filebeat-pythonIntegTest - mage pythonIntegTest
  • Took 35 min 53 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/filebeat-pythonIntegTest - mage pythonIntegTest
  • Took 32 min 17 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/filebeat-pythonIntegTest - mage pythonIntegTest
  • Took 32 min 19 sec . View more details here
  • Description: mage pythonIntegTest
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 1'

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 11

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_303_cisco – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_314_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_322_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_334_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_341_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_344_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_355_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_360_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_362_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_363_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest
  • Name: Build&Test / x-pack/filebeat-pythonIntegTest / test_fileset_file_388_cyberarkpas – x-pack.filebeat.tests.system.test_xpack_modules.XPackTest

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

💔 Build Failed

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

  • Duration: 145 min 32 sec

Pipeline error 1

This error is likely related to the pipeline itself. Click here
and then you will see the error (either incorrect syntax or an invalid configuration).

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

💚 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: 2024-01-04T17:54:45.701+0000

  • Duration: 157 min 45 sec

Test stats 🧪

Test Results
Failed 0
Passed 22189
Skipped 1395
Total 23584

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@AndersonQ AndersonQ merged commit 38ba816 into 7.17 Jan 5, 2024
7 of 10 checks passed
@AndersonQ AndersonQ deleted the mergify/bp/7.17/pr-37212 branch January 5, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants