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

Adds some more tests for log importer #17700

Merged
merged 3 commits into from Jul 1, 2021
Merged

Adds some more tests for log importer #17700

merged 3 commits into from Jul 1, 2021

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jun 22, 2021

Description:

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@sgiehl sgiehl added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Jun 22, 2021
@sgiehl sgiehl added this to the 4.4.0 milestone Jun 22, 2021
@sgiehl
Copy link
Member Author

sgiehl commented Jun 25, 2021

Note: One of the new tests is currently failing due to matomo-org/matomo-log-analytics#317

@diosmosis
Copy link
Member

Nice test addition 👍! Would it also be good to have a replay log for the test? There we can also include strange encoding for the action_name.

Also think it might be a good idea to regenerate OmniFixture at some point after this so we can see how the UI tests respond. What do you think?

@sgiehl
Copy link
Member Author

sgiehl commented Jun 28, 2021

@diosmosis
replay log should be covered by this:

$logFile = PIWIK_INCLUDE_PATH . '/tests/resources/access-logs/fake_logs_replay.log';
$logFileWithHost = PIWIK_INCLUDE_PATH . '/tests/resources/access-logs/fake_logs_replay_host.log';
$opts = array('--login' => 'superUserLogin',
'--password' => 'superUserPass',
'--recorders' => '1',
'--recorder-max-payload-size' => '1',
'--replay-tracking' => false,
'--exclude-older-than' => '2012-01-01 08:10:39 +0000',
'--exclude-host' => ['excluded.com']);

And the added tests won't change the OmniFixture, as the visits are imported within single tests and not within a Fixture.

@diosmosis
Copy link
Member

@sgiehl

replay log should be covered by this:

I meant adding the encoding to the reply logs so an encoded value can be added to action_name for tests.

And the added tests won't change the OmniFixture, as the visits are imported within single tests and not within a Fixture.

Would it be better if it was within a fixture so OmniFixture would pick it up? It might be useful to see if those types of encoded values breaks anything in the UI.

@sgiehl sgiehl marked this pull request as ready for review July 1, 2021 12:41
@sgiehl
Copy link
Member Author

sgiehl commented Jul 1, 2021

@diosmosis I won't change anything here for now, as there is more important stuff to work on. Maybe you can have a quick final look and merge the additional tests if they are fine. We can consider changing them later as well.

@sgiehl sgiehl added the Needs Review PRs that need a code review label Jul 1, 2021
@sgiehl sgiehl requested a review from diosmosis July 1, 2021 12:42
@diosmosis
Copy link
Member

👍 I'll make a new issue for adding encoded data to fixtures

@diosmosis diosmosis merged commit e02949b into 4.x-dev Jul 1, 2021
@diosmosis diosmosis deleted the logimportertests branch July 1, 2021 18:42
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants