Skip to content

Commit d950729

Browse files
committed
chore: skip test until directory manager is ready
1 parent a3bd2a5 commit d950729

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

agent-control/tests/on_host/scenarios/filesystem_ops.rs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
use std::{fs::read_to_string, path::Path, time::Duration};
1+
use std::{
2+
fs::read_to_string,
3+
path::{Path, PathBuf},
4+
time::Duration,
5+
};
26

37
use newrelic_agent_control::agent_control::{
48
defaults::GENERATED_FOLDER_NAME,
@@ -18,6 +22,7 @@ use crate::{
1822

1923
/// An on-host agent definition that includes filesystem entries should result in the entries being
2024
/// created in the appropriate location under the remote directory.
25+
#[cfg(unix)] // Skipping windows as directory manager is not yet implemented. TODO: adapt when ready
2126
#[test]
2227
fn writes_filesystem_entries() {
2328
let opamp_server = FakeServer::start_new();
@@ -29,7 +34,10 @@ fn writes_filesystem_entries() {
2934
let expected_file_contents = "Hello, world!";
3035
let agent_id = "test-agent";
3136
let dir_entry = "example-filepath";
32-
let file_path = "randomdir/randomfile.txt";
37+
let file_path = PathBuf::from("randomdir")
38+
.join("randomfile.txt")
39+
.to_string_lossy()
40+
.to_string();
3341

3442
create_file(
3543
format!(
@@ -91,6 +99,7 @@ deployment:
9199
/// An on-host agent definition that includes filesystem entries should result in the entries being
92100
/// created in the appropriate location under the remote directory and with their contents properly
93101
/// rendered from the defined variables.
102+
#[cfg(unix)] // Skipping windows as directory manager is not yet implemented. TODO: adapt when ready
94103
#[test]
95104
fn complete_render_and_and_write_files_and_dirs() {
96105
let opamp_server = FakeServer::start_new();
@@ -102,8 +111,14 @@ fn complete_render_and_and_write_files_and_dirs() {
102111
let agent_id = "test-agent";
103112

104113
// Rendered file paths
105-
let yaml_file_path = "randomdir/randomfile.yaml";
106-
let string_file_path = "randomdir-2/some_string.txt";
114+
let yaml_file_path = PathBuf::from("randomdir")
115+
.join("randomfile.yaml")
116+
.to_string_lossy()
117+
.to_string();
118+
let string_file_path = PathBuf::from("randomdir-2")
119+
.join("some-string.txt")
120+
.to_string_lossy()
121+
.to_string();
107122

108123
// Rendered directory paths
109124
let dir_path = "somedir";

0 commit comments

Comments
 (0)