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

Tests: Replace %TEMP% path hardcodings #307

Open
savornicesei opened this issue Jan 21, 2021 · 0 comments
Open

Tests: Replace %TEMP% path hardcodings #307

savornicesei opened this issue Jan 21, 2021 · 0 comments

Comments

@savornicesei
Copy link
Contributor

There are several places in unit tests where temporary path is hardcoded, for example:

  • project/UnitTests/Core/Config/PreprocessorTest.cs FAKE_ROOT
  • project/UnitTests/Core/IntegrationResultManagerTest.cs Assert.AreEqual(Platform.IsWindows ? @"c:\temp" : @"/tmp", result.WorkingDirectory);
  • project/UnitTests/Core/ProjectTest.cs Assert.AreEqual(Platform.IsWindows ? @"c:\temp" : @"/tmp", result.WorkingDirectory);

We can use Path.GetTempPath or the env. variables (see the remarks section in the link) to get the temp path without checking the platform.

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

No branches or pull requests

1 participant