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

🐛 avoid accidental empty properties #3465

Merged
merged 1 commit into from
Mar 2, 2024
Merged

🐛 avoid accidental empty properties #3465

merged 1 commit into from
Mar 2, 2024

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Mar 2, 2024

A friend accidentally the query (which we used pre v9) attribute for the property, instead of the mql field. This led to an empty property, which in this case is never valid. Properties must be non-empty.

Guarantee non-empty props + add more testing.

A friend accidentally the `query` (which we used pre v9) attribute for
the property, instead of the `mql` field. This led to an empty property,
which in this case is never valid. Properties must be non-empty.

Guarantee non-empty props + add more testing.

Signed-off-by: Dominik Richter <[email protected]>
Copy link
Contributor

github-actions bot commented Mar 2, 2024

Test Results

2 845 tests  +4   2 844 ✅ +4   1m 15s ⏱️ -2s
  186 suites ±0       1 💤 ±0 
    5 files   ±0       0 ❌ ±0 

Results for commit 6b9d43f. ± Comparison against base commit 2f1c166.

This pull request removes 3 and adds 7 tests. Note that renamed tests count towards both.
go.mondoo.com/cnquery/v10/llx ‑ TestSuccess/2024-03-02_23:16:06.942210413_+0000_UTC_m=+0.010116470
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-02_23:16:06.942210413_+0000_UTC_m=+0.010116470
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-02_23:16:06.942210413_+0000_UTC_m=+0.010116470#01
go.mondoo.com/cnquery/v10/explorer ‑ TestProperty_MustCompile
go.mondoo.com/cnquery/v10/explorer ‑ TestProperty_MustCompile/fails_on_invalid_MQL
go.mondoo.com/cnquery/v10/explorer ‑ TestProperty_MustCompile/works_with_a_valid_query
go.mondoo.com/cnquery/v10/explorer ‑ TestProperty_MustNotBeEmpty
go.mondoo.com/cnquery/v10/llx ‑ TestSuccess/2024-03-02_23:32:38.336119386_+0000_UTC_m=+0.020219302
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-02_23:32:38.336119386_+0000_UTC_m=+0.020219302
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-02_23:32:38.336119386_+0000_UTC_m=+0.020219302#01

@arlimus arlimus merged commit e3bd33d into main Mar 2, 2024
14 checks passed
@arlimus arlimus deleted the dom/nonempty-props branch March 2, 2024 23:36
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants