Skip to content

fork tests cleanup#3809

Merged
vilmibm merged 5 commits intotrunkfrom
fork-test-cleanup
Jun 11, 2021
Merged

fork tests cleanup#3809
vilmibm merged 5 commits intotrunkfrom
fork-test-cleanup

Conversation

@vilmibm
Copy link
Contributor

@vilmibm vilmibm commented Jun 9, 2021

This PR completely rewrites all of the tests for gh repo fork to bring them in line with our current testing approach. It additionally fixes some errors that were silently happening in the tests.

This is pre-work for some refactoring in gh repo fork which came out of wanting to change the config as discussed in #3091 .

I also made some minor non-test changes:

  • pass a Since function to fork as part of its options struct instead of a package level function
  • add a default remote name constant
  • make prompt.Confirm stub-able

@vilmibm vilmibm force-pushed the fork-test-cleanup branch from 639e273 to b099877 Compare June 10, 2021 21:46
@vilmibm vilmibm marked this pull request as ready for review June 10, 2021 21:51
@vilmibm vilmibm requested review from mislav and samcoe June 10, 2021 21:51
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

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

This is sooo much better than before! Thanks for taking this on.

@vilmibm vilmibm merged commit aecfc01 into trunk Jun 11, 2021
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

This is great work! Thanks for doing the heavy lifting

Rename bool
}

var Since = func(t time.Time) time.Duration {
Copy link
Contributor

Choose a reason for hiding this comment

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

Awww yess

}
}

func runCommand(httpClient *http.Client, remotes []*context.Remote, isTTY bool, cli string) (*test.CmdOut, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥🔥🔥 runCommand

Copy link

@Strawberry14388 Strawberry14388 left a comment

Choose a reason for hiding this comment

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

  • [ ]

Copy link

@Strawberry14388 Strawberry14388 left a comment

Choose a reason for hiding this comment

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

  • [ ]

@mislav mislav deleted the fork-test-cleanup branch June 17, 2021 10:58
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