From: Tim Otten Date: Sat, 11 May 2013 00:39:44 +0000 (-0400) Subject: CRM-12556 - Set admin API key for new test sites X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dc13c338150a0a38ff254b0e308a7ec3c9b4f73d;p=civicrm-core.git CRM-12556 - Set admin API key for new test sites ---------------------------------------- * CRM-12556: Assign api_key for a user via command-line http://issues.civicrm.org/jira/browse/CRM-12556 --- diff --git a/tools/scripts/mk-drupal-test-site b/tools/scripts/mk-drupal-test-site index c73b440189..ae4a830bc5 100755 --- a/tools/scripts/mk-drupal-test-site +++ b/tools/scripts/mk-drupal-test-site @@ -124,6 +124,8 @@ class CiviSeleniumSettings { var \$password = 'demo'; var \$adminUsername = '${ADMIN_USER}'; var \$adminPassword = '${ADMIN_PASS}'; + var \$adminApiKey = 'apikey${ADMIN_PASS}'; + var \$siteKey = '${SITE_KEY}'; var \$UFemail = 'noreply@civicrm.org'; function __construct() { \$this->fullSandboxPath = \$this->sandboxURL . \$this->sandboxPATH; @@ -141,4 +143,5 @@ drush -l "${SITE_URL}" -y pm-enable civicrm drush -l "${SITE_URL}" -y pm-enable civicrm_webtest drush -l "${SITE_URL}" -y user-create --password=demo --mail='demo@example.com' demo drush -l "${SITE_URL}" -y user-add-role civicrm_webtest_user demo +drush -l "${SITE_URL}" -y -u "$ADMIN_USER" civicrm-api contact.create id=user_contact_id api_key="apikey$ADMIN_PASS" popd