Skip to content

Conversation

@stefanhaller
Copy link
Collaborator

Fix an integration test that would occasionally fail. See commit message for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2023

Uffizzi Preview deployment-17493 was deleted.

// Make sure that the resulting commit message doesn't contain the
// message of the fixup commit; compare this to
// squash_down_second_commit.go, where it does.
Content(Contains(" commit 01")).
Copy link
Owner

@jesseduffield jesseduffield Feb 26, 2023

Choose a reason for hiding this comment

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

Could we make this clearer by going Contains("commit 01").DoesNotContain("<fixup commit message>")?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure what you mean: use the literal string <fixup commit message>? That would mean don't use CreateNCommits, but create three commits manually. Sure, can do that.

Let me know if I misunderstood.

Copy link
Owner

Choose a reason for hiding this comment

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

Yep that's what I meant :)

If you ran this test enough times it would eventually fail; this happened whenever the resulting squashed commit had a sha that happened to start with "02". We test that "commit 02" does not appear in the diff window, but in that case it did, at the very top of the window. A better fix might be to change the commit message that we use in CreateNCommits to something other than "commit XY", but that would require touching tons of tests, so this is the easier fix.
@jesseduffield
Copy link
Owner

Nice work, merging

@jesseduffield jesseduffield merged commit c34e0de into jesseduffield:master Mar 1, 2023
@stefanhaller stefanhaller deleted the make-test-more-robust branch March 1, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants