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

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

Merged
merged 1 commit into from Aug 17, 2016
Merged

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

merged 1 commit into from Aug 17, 2016

Conversation

glennsarti
Copy link
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.

None yet

2 participants