For background, see #1028426: Write to VCS permissions are missing / No repo was created

Ensure that after the creation of a sandbox or new project, a repository is created.

Comments

ilo’s picture

working on it.

Is there a real fact that I can assume to verify that the repository is created using the browser?
Does a link to that report exist?
or a link not showing errores or something I can use to verify that the repo has been created?
How much time does it take to create the repository?

Thanks!

eliza411’s picture

Right now, repo creation is nearly instantaneous if it succeeds at all.

The only way I know it doesn't exist is because I don't see the "Write to VCS" permissions and I don't see the "Git instructions" tab.

For now, testing that the creator of a project has the "Write to VCS" permission establishes that a repo exists, although its absence doesn't guarantee there is no repo. That's good enough for me.

mikey_p’s picture

2 other things to check for are the 'Repository viewer' and 'View commits' links that are in the Development block at the bottom of the sidebar on project pages.

ilo’s picture

No mikey_p, both links fail (first link is incomplete, second link exhust memory).. They will have to be checked later.

That permission is per project or per user? I mean, should the user have other projects guaranty that permission? if not, I'm fine with this check for now also.

git-vetted’s picture

Status: Active » Needs review

https://github.com/ilo/sitetesting/blob/master/tests/git-dev.drupal.org/...

Test project creation for git-user (sandbox) and git-vetted (sandbox and public project).

They can be tested by permissioned users at the test site.

I was able to pass all the tests.

aspilicious’s picture

"$this->drupalBartikLogin"

o_O

ilo’s picture

Actually, that is not the best name as long as drupal.org sites are not using bartik (it is bluecheese), but temporarely I was in the need of not using drupalLogin in favour of a different name. Now I'm pretty sure that the function can be renamed as drupalLogin because git-dev tests will only run remotelly to bluecheese themed sites.

The reason for this overloading is because drupal_web_testcase:drupalLogin() performs the assertion:

    $pass = $this->assertLink(t('Log out'), 0, t('User %name successfully logged in.', array('%name' => $user->name)), t('User login'));

However the link at drupal.org and git-dev.drupal.org is labeled as "Logout" making the assertion fail even if user is already logged in.

So, drupalBartikLogin is just a copy of drupalLogin with that assertion changed.

eliza411’s picture

Status: Needs review » Reviewed & tested by the community

We're using these tests, and they're super helpful. Thanks ilo! Looks like you still want to change "$this->drupalBartikLogin", so I'm leaving this open for now.

eliza411’s picture

Status: Reviewed & tested by the community » Needs work

The interface changed last night, so I'm marking this as "needs work".

Only one test fails:
User accepted Git terms. Browser rgitdevwebtestcase_issue_1031852.test 48 GitIssue1031852TestCase->testGitUser()

This must mean the scripts are setting the 'Git user' permission for the test user.

The 'Git access' is now located at http://git-dev.drupal.org/user/1102856/edit/git and has a very different workflow. There will be one additional validation step that is not yet present, where it says Are you *really* sure you like this username. It cannot be changed.

eliza411’s picture

Status: Needs work » Postponed
Issue tags: +git phase 2 leftovers

postponing

eliza411’s picture

Assigned: ilo » Unassigned

Unassigning ... writing tests is something the project can really use, so assign this to yourself if you can work on it.