diff --git a/Payload_Type/athena/athena/agent_code/Tests/Agent.Tests/PluginTests/LsTests.cs b/Payload_Type/athena/athena/agent_code/Tests/Agent.Tests/PluginTests/LsTests.cs index da966b08..4142a41a 100644 --- a/Payload_Type/athena/athena/agent_code/Tests/Agent.Tests/PluginTests/LsTests.cs +++ b/Payload_Type/athena/athena/agent_code/Tests/Agent.Tests/PluginTests/LsTests.cs @@ -36,14 +36,17 @@ public LsTests() [TestMethod] public void TestValidParentPath() { - string path = string.Empty; + string path; + string parent; if (OperatingSystem.IsWindows()) { path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "drivers", "etc"); + parent = "drivers"; } else { path = Path.Combine("/", "etc"); + parent = ""; } Dictionary parameters = new Dictionary { @@ -56,7 +59,7 @@ public void TestValidParentPath() ((TestMessageManager)_messageManager).hasResponse.WaitOne(); string response = ((TestMessageManager)_messageManager).GetRecentOutput().Result; FileBrowserTaskResponse fb = JsonSerializer.Deserialize(response); - Assert.AreEqual(fb.file_browser.parent_path, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "drivers")); + Assert.AreEqual(fb.file_browser.parent_path, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), parent)); } [TestMethod] public void TestGetFileListingLocal()