Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(coderd): add MockAuditor.Contains test helper#10421

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 2 commits intomainfromcj/flake/test-workspace-dormant
Nov 6, 2023

Conversation

johnstcn
Copy link
Member

Fixes#10396

// Contains returns true if, for each non-zero-valued field in expected,
// there exists a corresponding audit log in the mock auditor that matches
// the expected values. Returns false otherwise.
func (a *MockAuditor) Contains(t testing.TB, expected database.AuditLog) bool {
Copy link
Member

Choose a reason for hiding this comment

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

Might be useful to be able to require multiple log entries and thus, also that the order is correct? Just a thought, feel free to disregard if it's premature.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We could assert relative ordering perhaps, but asserting absolute ordering would likely run into the same kinds of issues we saw in#10396.

johnstcnand others added2 commitsNovember 6, 2023 09:05
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
@johnstcnjohnstcnforce-pushed thecj/flake/test-workspace-dormant branch from4a95a79 tof015c3cCompareNovember 6, 2023 09:05
@johnstcnjohnstcn merged commit26c3c12 intomainNov 6, 2023
@johnstcnjohnstcn deleted the cj/flake/test-workspace-dormant branchNovember 6, 2023 09:17
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 6, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@spikecurtisspikecurtisspikecurtis approved these changes

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake: TestWorkspaceDormant/OK reports too many audit logs
3 participants
@johnstcn@mafredri@spikecurtis

[8]ページ先頭

©2009-2025 Movatter.jp