Skip to content

Update unit tests to configure log-capturing when verifying logs #4030

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

Merged
merged 2 commits into from
May 16, 2025

Conversation

asnare
Copy link
Contributor

@asnare asnare commented May 15, 2025

Changes

This PR updates unit tests that verify logs to ensure they set up log-capturing to capture the level of the logs they're looking for. Previously this wasn't the case, and they relied on the underlying logging configuration have a level that would emit the record.

Linked issues

Relates databrickslabs/blueprint#238.

Tests

  • updated unit tests

… the expected level.

These tests were previously relying on the underlying logging configuration to ensure that the log records they expected were emitted.
@asnare asnare self-assigned this May 15, 2025
@asnare asnare requested a review from a team as a code owner May 15, 2025 16:08
@asnare asnare added this to UCX May 15, 2025
@asnare asnare added the internal this pull request won't appear in release notes label May 15, 2025
@asnare asnare temporarily deployed to account-admin May 15, 2025 16:08 — with GitHub Actions Inactive
@asnare asnare moved this to Ready for Review in UCX May 15, 2025
Copy link

github-actions bot commented May 15, 2025

✅ 2/2 passed, 24s total

Running from acceptance #8617

@asnare asnare requested review from FastLee and pritishpai May 15, 2025 16:56
@asnare asnare changed the title Update unit tests to ensure configure log-capturing when verifying logs Update unit tests to configure log-capturing when verifying logs May 15, 2025
@asnare asnare temporarily deployed to account-admin May 16, 2025 07:56 — with GitHub Actions Inactive
Copy link
Contributor

@FastLee FastLee left a comment

Choose a reason for hiding this comment

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

LGTM

@FastLee FastLee added this pull request to the merge queue May 16, 2025
Merged via the queue into main with commit 3d89c45 May 16, 2025
7 checks passed
@FastLee FastLee deleted the update-caplog-tests branch May 16, 2025 14:10
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in UCX May 16, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 16, 2025
…4030) (#4032)

## Changes

One of the unit tests (`test_cluster_remap_error`) updated in #4030
wasn't done properly, and still wasn't capturing the logs in the right
way. This PR fixes that.

### Linked issues

Follows #4030.

### Tests

- [x] manually tested (against `blueprint@cli-missing-debug-logging`)
- [x] updated unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal this pull request won't appear in release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants