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

Re-enable bitbucket test #462

Closed
jayfk opened this issue Apr 11, 2017 · 7 comments
Closed

Re-enable bitbucket test #462

jayfk opened this issue Apr 11, 2017 · 7 comments
Labels

Comments

@jayfk
Copy link
Contributor

jayfk commented Apr 11, 2017

Bitbucket repo tests are currently disabled (4ac30c5).

@vaibhav-jain
Copy link
Contributor

@jayfk Do you recall why it was disabled? Please share if you do :)

@dmoney
Copy link
Contributor

dmoney commented Feb 22, 2022

I uncommented it, fixed the compile errors ( branch, 032c8b6 ), and tried running the tests, but the two tests fail because the django bitbucket repo has been moved to github.

Looks like all the tests in test_repos.py are commented out or not there, so I'm trying to do the same thing with the GitHub tests to see if they'll work. (I think I need to set up a GitHub API key for that).

In general, should tests depend on a specific repo? Django could change their repo's tagline or move the repo to GitBlarg and these tests would start failing (if they were currently passing). Maybe the git hosts' APIs have a test repo that's guaranteed to stay there. For github we could probably use djangopackages' own repo.

@dmoney
Copy link
Contributor

dmoney commented Feb 23, 2022

Okay, github tests (3397390) passed once I created a personal access token and set GITHUB_TOKEN to that in .env.local.

@dmoney
Copy link
Contributor

dmoney commented Feb 23, 2022

I found some repos that are still on Bitbucket, but it doesn't seem to be heavily used anymore.

Of the 20ish bitbucket-hosted packages listed in Django Packages' CMS grid, only 2 are still on Bitbucket (clicking the links from the grid gave a 404 for the others). And the most recent one's last commit was in 2014.

The tests are still failing because it's not getting anything back for these repos, but not throwing an error (but then it didn't when it used django bitbucket repo URL either). I'm guessing some API authentication is required.

@dmoney
Copy link
Contributor

dmoney commented Feb 23, 2022

I updated the Bitbucket repo handler to use the Bitbucket Cloud 2.0 API (aa2ac2a), but one of the tests still fails because the repos have 0 forks. I'll see if I can find a more active one.

@dmoney
Copy link
Contributor

dmoney commented Feb 24, 2022

Found a repo with forks and got the tests passing. I'll create a PR once I clean up the script that I used to find the repo, so it can be used again if that repo goes away.

Also maybe I'll add something about the GITHUB_TOKEN to the docs.

@dmoney
Copy link
Contributor

dmoney commented Feb 25, 2022

Created PR #793.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants