about summary refs log tree commit diff stats
path: root/crates/rocie-server/tests/_testenv/mod.rs
blob: 58acaa5a862050e68f08a560c51281e891fa84b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// rocie - An enterprise grocery management system
//
// Copyright (C) 2026 Benedikt Peetz <benedikt.peetz@b-peetz.de>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This file is part of Rocie.
//
// You should have received a copy of the License along with this program.
// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.

//! This code was taken from *fd* at 30-06-2025.

use std::{path::PathBuf, process};

use rocie_client::apis::configuration::Configuration;

pub(crate) mod init;
pub(crate) mod log;

/// Environment for the integration tests.
pub(crate) struct TestEnv {
    pub(crate) name: &'static str,
    pub(crate) port: String,
    pub(crate) test_dir: PathBuf,
    pub(crate) paths: Paths,
    pub(crate) server_process: Option<process::Child>,
    pub(crate) config: Configuration,
}

pub(crate) struct Paths {
    pub(crate) db: PathBuf,
    pub(crate) test_dir: PathBuf,
}