agent: Wrong pid method used

no method named `as_pid` found for struct `namespace::Namespace` in the current scope
   --> src/namespace.rs:219:14
    |
34  | pub struct Namespace {
    | -------------------- method `as_pid` not found for this
...
219 |             .as_pid()
    |              ^^^^^^ method not found in `namespace::Namespace`

Switch to get_pid()

Fixes #1698

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
This commit is contained in:
Chelsea Mafrica 2021-05-03 19:40:45 -07:00
parent afe4df0449
commit 3d33250eac

View File

@ -216,7 +216,7 @@ mod tests {
let tmpdir = Builder::new().prefix("pid").tempdir().unwrap(); let tmpdir = Builder::new().prefix("pid").tempdir().unwrap();
let ns_pid = Namespace::new(&logger) let ns_pid = Namespace::new(&logger)
.as_pid() .get_pid()
.set_root_dir(tmpdir.path().to_str().unwrap()) .set_root_dir(tmpdir.path().to_str().unwrap())
.setup(); .setup();