k8s_test_framework/
resource_file.rs

1use std::path::Path;
2
3use crate::temp_file::TempFile;
4
5#[derive(Debug)]
6pub struct ResourceFile(TempFile);
7
8impl ResourceFile {
9    pub fn new(data: &str) -> std::io::Result<Self> {
10        Ok(Self(TempFile::new("custom.yaml", data)?))
11    }
12
13    pub fn path(&self) -> &Path {
14        self.0.path()
15    }
16}