After a project has been promoted, verify
site user can anonymously clone using the project short name
owner can push after following directions to remotes
site user and owner can NOT clone using the former sandbox url (which can be calculated based on git user name and node id)
Comments
Comment #1
eliza411 commentedSome clarification:
anonymous:
project owner:
Comment #2
pradeeprkara commentedtagging
Comment #3
pradeeprkara commentedObserved a behavior :
When I clone a sandbox repo as user:
i.e.
git clone --recursive --branch master ssh://gitvetteduser@git6.devdrupal.org:2020/sandbox/gitvetteduser/1723603.git 4sjvt9mhjseq5eqj_dir1It is asking to enter gitvetteduse password and when entered , cloning is happening (This is fine)
But when an anonymous user tries to clone the same repo:
i.e.
git clone --recursive --branch master ssh://git6.devdrupal.org:2020/sandbox/gitvetteduser/1723603.git 4sjvt9mhjseq5eqj_dir2it is again again asking the system user password at git6.devdrupal.org. If I am logged in as root user, it will ask to enter root@git6.devdrupal.org password and when I just hit enter it will start cloning.
Is this normal?
Comment #4
eliza411 commentedI think this is normal behavior. @sdboyer can weigh in, but you should probably continue as if it's okay.
What's happening is that all repositories are public and can be cloned by anyone, even if the authentication fails.
If you view the project page logged out, you'll see what an anonymous user sees and shouldn't experience the password prompt on clone.
Comment #5
pradeeprkara commentedtagging
Comment #6
pradeeprkara commentedAs drupal.org and git6site.devdrupal.org have different patterns for git end points, sandbox git urls have been generated based on the below example urls:
git6site.devdrupal.org:
user logged in:
git clone --recursive --branch master ssh://username@git6.devdrupal.org:2020/sandbox/username/project_short_code.gitAnonymous:
git clone --recursive --branch master ssh://git6.devdrupal.org:2020/sandbox/username/project_short_code.gitdrupal.org:
When user logged in:
git clone --recursive --branch master username@git.drupal.org:sandbox/username/project_short_code.gitAnonymous:
git clone --recursive --branch master http://git.drupal.org/sandbox/username/project_short_code.gitPlease review the commit.
2a455dc
Some updates: 648d801
Also merged #1706946: Edit project node (promoted) - (promoted_projects.feature) here
Comment #7
pradeeprkara commentedComment #8
eliza411 commentedI made some changes to the feature language in http://drupalcode.org/project/doobie.git/commit/b528aac
I also have a couple of questions:
Is there a reason for skipping the When statement here? I think breaking it into the two conventional steps will make where failure is occurring much easier to see:
I'm not sure based on what I see that this tests what's intended (although I think it does). I expect to see something more user-visible, like:
Comment #9
pradeeprkara commentedtagging
Comment #10
pradeeprkara commentedThe When step was skipped because of the unavailability of old sandbox git endpoints in the current Version control tab.
Separated the action and outcome as suggested.
Please review the feature: 0902136
PS: As there are some issues reported after the latest upgrade:#1784356: Unable to initialize the repository, you might get some failed scenarios until it is resolved.
Comment #11
eliza411 commentedThis is, as you point out, waiting on #1784356: Unable to initialize the repository - I marked the scenarios @wip and am moving this forward to code review on the hope that jhedstrom or someone can help with them.
Comment #12
pradeeprkara commentedstep definitions have been modified to support anonymous user cloning. The password will be passed as "" in this case.
Also the error which anonymous user will get while cloning an old sandbox repo has been modified as "remote HEAD refers to nonexistent ref, unable to checkout"
Please review the commit: 2820a19
Comment #13
eliza411 commentedAdded a wip tag to the final scenario as the I clone the sandbox repo step is failing.
Comment #14
pradeeprkara commentedI clone the sandbox repo works for me and I'm not sure why it failed for you. can you run once again and see?
Removed @wip tag and updated the feature context with "Expect" library status check(mostly for windows)
The changes are at: 76e8217
Comment #15
eliza411 commentedThis still fails on ubuntu with expect library set up:
Comment #16
pradeeprkara commentedTested the feature from an Ubuntu OS and found that GIT returns different error string in the mentioned scenario; not sure it is because of the difference in the installed version of GIT. So I think , hard coding the expected string should be avoided.
Created a new custom step:
I should see an errorPlease review and rerun the test. The commit: bcd5227, fa622af
Comment #17
eliza411 commentedI'm getting:
I've still merged this to master with the wip tag
Comment #18
pradeeprkara commentedIt seems like you still have the previous version. I had replaced that step with a new one. You can it in my previous commit: http://drupalcode.org/project/doobie.git/commit/bcd5227
Comment #19
eliza411 commentedI must have run this from master ... Will honestly be glad to have that gone! Looks good. I've removed the @wip tag, so it's ready for inclusion in the full-suite.
Comment #20
pradeeprkara commentedthis was left to tag
Comment #21
kssundar commentedNeed 7.x update
Comment #22
kssundar commentedPorted to 7.x - http://drupalcode.org/project/doobie.git/commit/c63f398
Comment #23
kssundar commentedreview later
Comment #24
eliza411 commentedI removed the @wip tag so this test will be included in full runs. It's as ready as it can be until the D7 Drupal.org is ready for feedback.
http://drupalcode.org/project/doobie.git/commit/44de740
Comment #25
eliza411 commentedThe project shortname is getting lost between creation in the first scenario and the post promotion check.
Comment #26
eliza411 commentedremoving tag