Skip to content

(BKR-914) Add workaround for beaker bug BKR-914#184

Merged
ferventcoder merged 1 commit intopuppetlabs:masterfrom
glennsarti:ticket/master/MODULES-3256-fix-login
Aug 17, 2016
Merged

(BKR-914) Add workaround for beaker bug BKR-914#184
ferventcoder merged 1 commit intopuppetlabs:masterfrom
glennsarti:ticket/master/MODULES-3256-fix-login

Conversation

@glennsarti
Copy link
Copy Markdown
Contributor

@glennsarti glennsarti commented Aug 17, 2016

The Windows 2012 R2 VMPooler templates were recently updated due to the older
cygwin version not populating environment variables correctly. However this exposed an
issue in Beaker (BKR-914) whereby it's get_env_var function was far too loose
in its pattern matching causing multiple lines to be returned for a single env
var. This then caused newline characters to be injected into the
~/.ssh/environment file, which then poluted calls to STDOUT and subsequently
any tests that depended on parsing STDOUT could potentially fail.

This commit adds workarounds to this issue until BKR-914 is fixed and published.

  • The output from a get_env_var is sanitised and if required, additional regex
    is injected to get the required effect from the env | grep #{key} call in
    Beaker
  • An existance check is added so that the CommonProgramFiles env var is only
    added if it does not exist. This avoids modifying the environment
    unncessarily.

This commit can be partially revertted once BKR-914 is resolved and published.

The Windows 2012 R2 VMPooler templates were recently updated due to the older
version not populating environment variables correctly.  However this exposed an
issue in Beaker (BKR-914) whereby it's `get_env_var` function was far too loose
in its pattern matching causing multiple lines to be returned for a single env
var.  This then caused newline characters to be injected into the
`~/.ssh/environment` file, which then poluted calls to STDOUT and subsequently
any tests that depended on parsing STDOUT could potentially fail.

This commit adds workarounds to this issue until BKR-914 is fixed and published.
- The output from a `get_env_var` is sanitised and if required, additional regex
  is injected to get the required effect from the `env | grep #{key}` call in
  Beaker
- An existance check is added so that the CommonProgramFiles env var is only
  added if it does not exist.  This avoids modifying the environment
  unncessarily.

This commit can be partially revertted once BKR-914 is resolved and published.
@ferventcoder ferventcoder merged commit 866be4a into puppetlabs:master Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants