@@ -12,6 +12,7 @@ use nexus_config::NexusConfig;
12
12
use nexus_test_interface:: NexusServer ;
13
13
use nexus_test_utils:: resource_helpers:: DiskTest ;
14
14
use signal_hook_tokio:: Signals ;
15
+ use std:: fs;
15
16
16
17
fn main ( ) -> anyhow:: Result < ( ) > {
17
18
oxide_tokio_rt:: run ( async {
@@ -50,6 +51,9 @@ struct RunAllArgs {
50
51
/// Override the gateway server configuration file.
51
52
#[ clap( long, default_value = DEFAULT_SP_SIM_CONFIG ) ]
52
53
gateway_config : Utf8PathBuf ,
54
+ /// Override the nexus configuration file.
55
+ #[ clap( long, default_value = "./nexus/examples/config.toml" ) ]
56
+ nexus_config : Utf8PathBuf ,
53
57
}
54
58
55
59
impl RunAllArgs {
@@ -60,9 +64,10 @@ impl RunAllArgs {
60
64
let mut signal_stream = signals. fuse ( ) ;
61
65
62
66
// Read configuration.
63
- let config_str = include_str ! ( "../../../nexus/examples/config.toml" ) ;
64
- let mut config: NexusConfig =
65
- toml:: from_str ( config_str) . context ( "parsing example config" ) ?;
67
+ let config_str = fs:: read_to_string ( & self . nexus_config ) ?;
68
+ let mut config: NexusConfig = toml:: from_str ( & config_str) . context (
69
+ format ! ( "parsing config: {}" , self . nexus_config. as_str( ) ) ,
70
+ ) ?;
66
71
config. pkg . log = dropshot:: ConfigLogging :: File {
67
72
// See LogContext::new(),
68
73
path : "UNUSED" . to_string ( ) . into ( ) ,
0 commit comments