Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Add Acquia-purge config for domain detection #487

Merged
merged 3 commits into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion assets/sites/default/settings.acquia.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@
* Acquia Settings.
*/

/**
* Override domain detection in Acquia Purge.
*/
if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {
switch ($_ENV['AH_SITE_ENVIRONMENT']) {
case 'prod':
$domain = $conf['acquia']['prod']['base_url'];
$domain = parse_url($domain, PHP_URL_HOST);
$conf['acquia_purge_domains'] = array($domain);
break;
case 'test':
$domain = $conf['acquia']['test']['base_url'];
$domain = parse_url($domain, PHP_URL_HOST);
$conf['acquia_purge_domains'] = array($domain);
break;
case 'dev':
$domain = $conf['acquia']['dev']['base_url'];
$domain = parse_url($domain, PHP_URL_HOST);
$conf['acquia_purge_domains'] = array($domain);
break;
}
}

if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {
if (isset($conf['memcache_servers'])) {
$conf['cache_backends'][] = './sites/all/modules/contrib/memcache/memcache.inc';
Expand Down Expand Up @@ -66,7 +89,7 @@
'api/action/datastore/search.json',
);
}

// ODSM edit forms.
$high_memory_paths[] = 'admin/config/services/odsm/edit';

Expand Down
15 changes: 9 additions & 6 deletions dkan/test/features/group.editor.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ Feature: Site Manager administer groups
| Gabriel | Group A | administrator member | Active |
| Katie | Group A | member | Active |
| Jaz | Group A | member | Pending |
And resources:
| title | publisher | format | author | published | description |
| GER1 | Group A | csv | Katie | Yes | |

Scenario: Edit group as group administrator
Given I am logged in as "Gabriel"
Expand Down Expand Up @@ -140,15 +137,21 @@ Feature: Site Manager administer groups
Then I should see "Total members: 3"

Scenario: View the number of content on group as group administrator
Given I am logged in as "Gabriel"
Given resources:
| title | publisher | format | author | published | description |
| content2 | Group A | csv | Katie | Yes | |
And I am logged in as "Gabriel"
And I am on "Group A" page
And I click "Group"
When I click "People"
Then I should see "Total content: 1"

Scenario: Edit resource content created by others on group as editor
Given I am logged in as "Martin"
And I am on "GER1" page
Given resources:
| title | publisher | format | author | published | description |
| content1 | Group A | csv | Katie | Yes | |
And I am logged in as "Martin"
And I am on "content1" page
Then I should see "Edit"

Scenario: Show correct number of groups to which user belongs
Expand Down