Skip to content

Remove the LOCAL_GIT_BRANCHES setting #4985

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

Closed
ericholscher opened this issue Dec 10, 2018 · 2 comments
Closed

Remove the LOCAL_GIT_BRANCHES setting #4985

ericholscher opened this issue Dec 10, 2018 · 2 comments
Assignees

Comments

@ericholscher
Copy link
Member

We introduced this here to make tests work, but it isn't how things work in production: #4984

We should remove this setting, and make our tests work properly with remote repos. I see a couple ways we could handle this:

  • The make_get_branch function could manipulate the git repo so that it has a remote branch instead of a local branch
  • We could mock repo.branches in the places we use it. I went down this road briefly, but it was a little bit complex.

I think the first approach is best, but I'm not sure how to do it easily.

@humitos
Copy link
Member

humitos commented Dec 10, 2018

I think the first approach is best, but I'm not sure how to do it easily.

We should follow the same workflow that we do in production:

  1. The repository is created by another person with all its branches: we can create a temporal repository
  2. We clone it from there (localhost)
  3. We start running our test over the cloned one instead of the originally created

That way, I suppose that branches will be remotes and the structure of the repository will be pretty similar to what we have in production.

@humitos humitos added this to the Test improvements milestone Dec 10, 2018
@stsewd
Copy link
Member

stsewd commented Dec 10, 2018

There are some tests that use the clone step, I guess we only need to put that step in our tests

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

No branches or pull requests

3 participants