Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process / documentation around running BLT Behat tests in a Pipelines SAML environment #2823

Closed
anavarre opened this issue May 17, 2018 · 2 comments
Labels
Support A support request

Comments

@anavarre
Copy link
Contributor

anavarre commented May 17, 2018

  • Use case: site 100% authenticated behind SAML
  • Issue: Behat tests run as authenticated user always fail on Pipelines while they pass perfectly locally (via $config['simplesamlphp_auth.settings']['activate'] = false; in local.settings.php).

I did try the following options, but none of them worked:

Env-specific settings.php

In settings.php

if (file_exists(__DIR__ . '/settings/pipelines.settings.php')) {
  include __DIR__ . '/settings/pipelines.settings.php';
}

After require DRUPAL_ROOT . "/../vendor/acquia/blt/settings/blt.settings.php";

And in pipelines.settings.php

<?php

if ($is_ah_ode_env) {
  // Turn off SAML when running Pipelines Behat test.
  $config['simplesamlphp_auth.settings']['activate'] = false;
}

Note: also tried with $is_ah_env but it didn't make any difference.

Disable the module via blt.yml

  ci:
    enable: {  }
    uninstall: [acquia_connector, shield, simplesamlphp_auth]

Pipelines does report the module was uninstalled but this doesn't make any difference and the tests keep on failing.

Disable SAML in Behat tests

Followed the recommendation in #2688 (comment) and made sure to apply the patch at e0277c0

Note: this solution doesn't work locally either. Behat tests just hang forever.


The case of config_split

I know one option could be to evaluate a split for ci and disable SAML there, but a) I don't see why it would behave any differently from the shutdown options we have at our disposal above and b) it's a very heavy option for just this very need we have.

@mikemadison13
Copy link
Contributor

@anavarre the only thing I could see with the config split option is that you are disabling the module and removing the configuration, so that Drupal itself isn't trying to redirect to a SAML provider. I dunno how that behavior interacts vs. the settings file. The cases where I've done SAML we had it off by default and used config splits for dev/test/prod to enable it (so CI never even tried).

@mikemadison13 mikemadison13 added the Support A support request label May 17, 2018
@mikemadison13
Copy link
Contributor

closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support A support request
Projects
None yet
Development

No branches or pull requests

2 participants