Uploaded image for project: 'appNG'
  1. appNG
  2. APPNG-2134

CommandBatchTest.testSysEnvVariables() fails under windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.17.0
    • Component/s: appng-cli
    • Labels:
      None
    • Environment:

      windows

      Description

      The critial line here are:

      Assert.assertArrayEquals(new String[0], batch.parseLine("def SYSTEMROOT = ${systemEnv['SystemRoot']}"));
      Assert.assertTrue(StringUtils.equalsIgnoreCase(variables.get("SYSTEMROOT"), "c:\\windows"));

      Although the test works when executed in Eclipse, it fails when executed with Maven.
      The reason is that Maven expect environment variables to be in upper case:

      Note: Environment variables like FOO are available as properties of the form env.FOO. Further note that environment variable names are normalized to all upper-case on Windows.

      Source: http://maven.apache.org/guides/introduction/introduction-to-profiles.html

      Related:
      https://issues.apache.org/jira/browse/MNG-5598

        Attachments

          Activity

            People

            • Assignee:
              mueller.matthias Matthias Müller
              Reporter:
              mueller.matthias Matthias Müller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: