637
edits
DaveLawrence (talk | contribs) No edit summary |
DaveLawrence (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
== Getting Started == | == Getting Started == | ||
'''NOTE:''' We are using the dev server for QA test runs. | |||
''' | The following manual steps are required to get QA up and running for Phabricator testing on Mozilla's staging server. | ||
Alternatively, you can try out the a preset environment using Docker from this [https://github.com/dklawren/phabricator-qa Github repo]. Once checked out run: | |||
docker-compose build | |||
docker-compose run qa su - phab | |||
You will still need to perform step 8 using your own Conduit API keys. | |||
'''Manual Setup''' | |||
1. Clone the following repositories to the same directory on your machine: | 1. Clone the following repositories to the same directory on your machine: | ||
git clone https://github.com/phacility/libphutil | git clone https://github.com/phacility/libphutil $HOME/libphutil | ||
git clone https://github.com/phacility/arcanist | git clone https://github.com/phacility/arcanist $HOME/arcanist | ||
git clone https://github.com/mozilla-conduit/arcanist --branch master --single-branch cinnabarc | git clone https://github.com/mozilla-conduit/arcanist --branch master --single-branch $HOME/cinnabarc | ||
2. Add vanilla arcanist (<code>bin | 2. Add vanilla arcanist (<code>$HOME/arcanist/bin</code> from your phacility repo checkout) to your path. On OS X and Linux (and the Windows 10 Linux Subsystem), you can add the following to your `~/.bash_profile`: | ||
export PATH="$PATH:$HOME/arcanist/bin" | |||
Doing so will allow you to use the <code>arc</code> command from anywhere on your machine. | Doing so will allow you to use the <code>arc</code> command from anywhere on your machine. | ||
Line 19: | Line 28: | ||
git clone https://github.com/glandium/git-cinnabar.git --branch master --single-branch | git clone https://github.com/glandium/git-cinnabar.git --branch master --single-branch | ||
export PATH=/ | export PATH="$PATH:$HOME//git-cinnabar:$PATH | ||
cd git-cinnabar && git cinnabar download | cd git-cinnabar && git cinnabar download | ||
4. Alias Arcanist modified for git-cinnabar use to <code>cinnabarc</code>. This will allow to use both vanilla and modified Arcanist interchangeably: | 4. Alias Arcanist modified for git-cinnabar use to <code>cinnabarc</code>. This will allow to use both vanilla and modified Arcanist interchangeably. You can add the following to your `~/.bash_profile: | ||
alias cinnabarc="$HOME/cinnabarc/bin/arc" | |||
5. Install the moz-phab arcanist wrapper used for submitting stacked revisions to Phabricator. You can see instructions on how to install from the [https://github.com/mozilla-conduit/review Github repo]. The <code>moz-phab</code> command needs to be in your PATH such as in $HOME/bin. | |||
6. Reload your .bash_profile: | |||
source $HOME/.bash_profile | |||
7. Clone the repo(s) you plan to test on: | |||
* <code>hg clone https://hg.mozilla.org/automation/phabricator-qa-dev/</code> | * <code>hg clone https://hg.mozilla.org/automation/phabricator-qa-dev/</code> | ||
* <code>git clone hg::https://hg.mozilla.org/automation/phabricator-qa-dev/ phabricator-qa-dev-cinnabar</code> | * <code>git clone hg::https://hg.mozilla.org/automation/phabricator-qa-dev/ phabricator-qa-dev-cinnabar</code> | ||
8. In the local <code>phabricator-qa-dev</code> repository checkout, run: | |||
arc install-certificate | arc install-certificate | ||
Line 41: | Line 56: | ||
cinnabarc install-certificate | cinnabarc install-certificate | ||
9. Test away! You can create branches within your local <code>phabricator-qa-dev</code> repository checkout, add commits, and send them to Phabricator via <code>mozphab</code>. See the [http://moz-conduit.readthedocs.io/en/latest/phabricator-user.html Mozilla Phabricator User Documentation] for more. | |||
This should be all you need to get going with moz-phab, arc, and our staging and dev servers! | This should be all you need to get going with moz-phab, arc, and our staging and dev servers! | ||
Line 74: | Line 89: | ||
#* To create bugs directly and bypass triaging, go to https://bugzilla.allizom.org/enter_bug.cgi?product=Firefox&format=__default__ (staging) or https://bugzilla-dev.allizom.org/enter_bug.cgi?product=Firefox&format=__default__ (dev) | #* To create bugs directly and bypass triaging, go to https://bugzilla.allizom.org/enter_bug.cgi?product=Firefox&format=__default__ (staging) or https://bugzilla-dev.allizom.org/enter_bug.cgi?product=Firefox&format=__default__ (dev) | ||
# Using the repo listed in the "Getting Started" section above that matches the environment you are testing, make some change to a file. | # Using the repo listed in the "Getting Started" section above that matches the environment you are testing, make some change to a file. | ||
# Run <code>hg commit -A -m ' | # Run <code>hg commit -A -m 'Bug <bugid>: New changes</code> | ||
# Run <code>moz-phab</code> | # Run <code>moz-phab</code> | ||
====Results==== | ====Results==== | ||
Line 87: | Line 100: | ||
## The link is correct based on the environment (bugzilla.allizom.org for staging, bugzilla-dev.allizom.org for dev). | ## The link is correct based on the environment (bugzilla.allizom.org for staging, bugzilla-dev.allizom.org for dev). | ||
## If the bug in Bugzilla is a public bug, the revision should also be public. | ## If the bug in Bugzilla is a public bug, the revision should also be public. | ||
# Visiting the bug on Bugzilla shows an | # Visiting the bug on Bugzilla shows an entry for the new revision in the Phabricator Revisions section. | ||
# Author received an email from <code>mozphab-dev@mozilla.com</code>. It has a title formatted as "[Differential] [Changed Policy] D{revision number}: {first line}." and a body with a text "phab-bot changed the visibility from "Administrators" to "Public (No Login Required)"." | # Author received an email from <code>mozphab-dev@mozilla.com</code>. It has a title formatted as "[Differential] [Changed Policy] D{revision number}: {first line}." and a body with a text "phab-bot changed the visibility from "Administrators" to "Public (No Login Required)"." | ||
Line 112: | Line 125: | ||
# Go to bugzilla and create a security bug: | # Go to bugzilla and create a security bug: | ||
#* Click "Edit Bug", open the "Security" panel, and check one of the security-sensitive boxes, e.g. "Security-Sensitive Core Bug". | #* Click "Edit Bug", open the "Security" panel, and check one of the security-sensitive boxes, e.g. "Security-Sensitive Core Bug". | ||
# | # Run <code>hg commit -A -m 'Bug <bugid>: Private changes</code> | ||
# Run <code>moz-phab</code>. | # Run <code>moz-phab</code>. | ||
====Results==== | ====Results==== | ||
Line 127: | Line 138: | ||
# The revision is visible to the user who made it. | # The revision is visible to the user who made it. | ||
# The revision is visible to users belonging to the security groups of the bug. | # The revision is visible to users belonging to the security groups of the bug. | ||
# | # Visiting the bug on Bugzilla shows an entry for the new revision in the Phabricator Revisions section. | ||
# The revision is NOT visible to the public without logging in. | # The revision is NOT visible to the public without logging in. | ||
# The revision is NOT visible to logged in members without the correct permission. | # The revision is NOT visible to logged in members without the correct permission. | ||
Line 136: | Line 147: | ||
====Test Plan==== | ====Test Plan==== | ||
# | # Go to bugzilla and create a public bug: | ||
# Run <code>hg commit -A -m 'Bug <bugid>: Public changes</code> | |||
# Run <code>moz-phab</code>. | # Run <code>moz-phab</code>. | ||
# Check if revision is available for public. | # Check if revision is available for public. | ||
# Go to bugzilla and create a security bug: | # Go to bugzilla and create a security bug: | ||
Line 157: | Line 167: | ||
# The revision is NOT visible to logged in members without the correct permission. | # The revision is NOT visible to logged in members without the correct permission. | ||
# The revision IS visible to the second Bugzilla user. | # The revision IS visible to the second Bugzilla user. | ||
# | # Visiting the bug on Bugzilla shows an entry for the new revision in the Phabricator Revisions section. | ||
# The reviewer received an email from the author with a text "The content for this message can only be transmitted over a secure channel." and a link to Phabricator. | # The reviewer received an email from the author with a text "The content for this message can only be transmitted over a secure channel." and a link to Phabricator. | ||
Line 163: | Line 173: | ||
====Test Plan==== | ====Test Plan==== | ||
# Enter the bug id as specified for each expected result below. | # Enter the bug id as specified for each expected result below. | ||
# Run <code>hg commit -A -m 'Bug <bugid>: Public changes</code> | |||
# Run <code>moz-phab</code>. | |||
====Results==== | ====Results==== | ||
Line 177: | Line 186: | ||
====Test Plan==== | ====Test Plan==== | ||
# | # Run <code>hg commit -A -m 'Bug <bugid>: Public changes</code> | ||
# Run <code>moz-phab</code> | # Run <code>moz-phab</code>. | ||
# Create a different comment using same bug id but different title. | |||
# | |||
====Result==== | ====Result==== | ||
# Both revisions are created successfully. | # Both revisions are created successfully. | ||
# | # Visiting the bug on Bugzilla shows 2 corresponding entries for the revisions in the Phabricator Revisions section. | ||
=== T8 - Requesting and leaving a review on a revision is successful === | === T8 - Requesting and leaving a review on a revision is successful === | ||
Line 209: | Line 216: | ||
# Create a new bug. | # Create a new bug. | ||
# Create a commit and run <code>moz-phab</code>. | # Create a commit and run <code>moz-phab</code>. | ||
# | # On a previously created revision, perform the "Abandon Revision" action from the "Add Action" dropdown. | ||
====Results==== | ====Results==== | ||
# The bug | # The bug shows the revision as 'Abandoned' in the Phabricator Revisions list of the bug. | ||
# The bug | # The bug history shows the attachment is being set to obsolete. | ||
=== T10 - Reclaiming a revision unobsoletes the attachment === | === T10 - Reclaiming a revision unobsoletes the attachment === | ||
Line 222: | Line 228: | ||
====Results==== | ====Results==== | ||
# The bug's Phabricator attachment is unobsoleted. | # The bug's Phabricator attachment is unobsoleted and the revisions is no abandoned in the Phabricator revisions list. | ||
=== T11 - Creating a Diff from local git repository to remote Mercurial repository is not allowed === | === T11 - Creating a Diff from local git repository to remote Mercurial repository is not allowed === | ||
Line 228: | Line 234: | ||
====Test Plan==== | ====Test Plan==== | ||
# Change directory to the repository <code>phabricator-qa-dev-cinnabar</code>. | # Change directory to the repository <code>phabricator-qa-dev-cinnabar</code>. | ||
# Create a commit with git and run <code> | # Create a commit with git and run <code>arc diff</code>. | ||
# Fill the needed data (<code>Test Plan</code>) and confirm. | # Fill the needed data (<code>Test Plan</code>) and confirm. | ||
Line 261: | Line 267: | ||
# Create a new hg commit. | # Create a new hg commit. | ||
# Run <code>moz-phab</code>. | # Run <code>moz-phab</code>. | ||
====Results==== | ====Results==== |
edits