Skip to content

Add tests for IniFile failure modes - #4847

Merged
Saviq merged 1 commit into
mainfrom
ini-file-failure-tests
Apr 22, 2026
Merged

Add tests for IniFile failure modes#4847
Saviq merged 1 commit into
mainfrom
ini-file-failure-tests

Conversation

@tarek-y-ismail

@tarek-y-ismail tarek-y-ismail commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Related: #4863, #4829, #4846

What's new

  • Adds a bunch of tests for IniFile's unhappy cases: invalid syntax, whitespace, etc...

How to test

  • <path/to/build>/miral-test --gtest_filter=LiveConfigIniFile.*

Checklist

  • Tests added and pass

@tarek-y-ismail tarek-y-ismail self-assigned this Apr 14, 2026
@tarek-y-ismail
tarek-y-ismail requested a review from a team as a code owner April 14, 2026 15:41
@tarek-y-ismail
tarek-y-ismail force-pushed the ini-file-handle-whitespace branch from 2fd5a5c to 5158833 Compare April 14, 2026 16:04
@tarek-y-ismail
tarek-y-ismail force-pushed the ini-file-failure-tests branch from 2c0b064 to 415663e Compare April 14, 2026 16:05
@tarek-y-ismail
tarek-y-ismail force-pushed the ini-file-handle-whitespace branch 3 times, most recently from 40d3e3f to 097e8d7 Compare April 15, 2026 16:22
Base automatically changed from ini-file-handle-whitespace to main April 16, 2026 11:54
@tarek-y-ismail
tarek-y-ismail force-pushed the ini-file-failure-tests branch 2 times, most recently from 7e10bce to 58e209b Compare April 16, 2026 15:17
Copilot AI review requested due to automatic review settings April 16, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds regression tests for miral::live_config::IniFile around invalid/edge-case INI input, covering behavior introduced/clarified by the recent BasicStore extraction and whitespace trimming changes.

Changes:

  • Add tests ensuring unparsable scalar values are ignored (handlers not invoked) and unparsable array entries are filtered.
  • Add tests for syntax edge cases (non-INI lines, empty keys/values, values containing =).
  • Add tests validating whitespace trimming and reload semantics (no array accumulation; latest scalar wins).

Comment thread tests/miral/live_config_ini_file.cpp Outdated
@tarek-y-ismail
tarek-y-ismail force-pushed the ini-file-failure-tests branch 2 times, most recently from b34340e to 1263274 Compare April 16, 2026 16:05
Comment thread tests/miral/live_config_ini_file.cpp Outdated
Comment thread tests/miral/live_config_ini_file.cpp Outdated
@tarek-y-ismail
tarek-y-ismail force-pushed the ini-file-failure-tests branch from 1263274 to e6b7847 Compare April 17, 2026 15:49
@tarek-y-ismail
tarek-y-ismail changed the base branch from main to basic-store-better-handle-unhappy-paths April 17, 2026 15:51
@tarek-y-ismail
tarek-y-ismail force-pushed the basic-store-better-handle-unhappy-paths branch 2 times, most recently from 63fc895 to 6cda5d0 Compare April 20, 2026 15:00
Base automatically changed from basic-store-better-handle-unhappy-paths to main April 20, 2026 16:59
@tarek-y-ismail
tarek-y-ismail force-pushed the ini-file-failure-tests branch from e6b7847 to 75abd5e Compare April 21, 2026 12:17
Comment thread tests/miral/live_config_ini_file.cpp
@tarek-y-ismail
tarek-y-ismail added this pull request to the merge queue Apr 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 21, 2026
@tarek-y-ismail
tarek-y-ismail added this pull request to the merge queue Apr 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 21, 2026
@Saviq
Saviq added this pull request to the merge queue Apr 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 21, 2026
@Saviq
Saviq added this pull request to the merge queue Apr 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 22, 2026
@tarek-y-ismail
tarek-y-ismail added this pull request to the merge queue Apr 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@tarek-y-ismail
tarek-y-ismail added this pull request to the merge queue Apr 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@tarek-y-ismail
tarek-y-ismail added this pull request to the merge queue Apr 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@tarek-y-ismail
tarek-y-ismail added this pull request to the merge queue Apr 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@Saviq
Saviq added this pull request to the merge queue Apr 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 22, 2026
@Saviq
Saviq merged commit 9a30215 into main Apr 22, 2026
54 checks passed
@Saviq
Saviq deleted the ini-file-failure-tests branch April 22, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants