@@ -4,6 +4,13 @@ fn vector_cmd() -> Command {
44 Command :: new ( env ! ( "CARGO_BIN_EXE_vector" ) )
55}
66
7+ fn nonexistent_config_dir ( ) -> String {
8+ std:: env:: temp_dir ( )
9+ . join ( "vector-test-nonexistent" )
10+ . to_string_lossy ( )
11+ . to_string ( )
12+ }
13+
714#[ test]
815fn test_help ( ) {
916 let output = vector_cmd ( ) . arg ( "--help" ) . output ( ) . expect ( "Failed to run" ) ;
@@ -69,7 +76,7 @@ fn test_env_help() {
6976 let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
7077 assert ! ( stdout. contains( "list" ) ) ;
7178 assert ! ( stdout. contains( "create" ) ) ;
72- assert ! ( stdout. contains( "suspend " ) ) ;
79+ assert ! ( stdout. contains( "secret " ) ) ;
7380}
7481
7582#[ test]
@@ -81,7 +88,7 @@ fn test_deploy_help() {
8188 assert ! ( output. status. success( ) ) ;
8289 let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
8390 assert ! ( stdout. contains( "list" ) ) ;
84- assert ! ( stdout. contains( "create " ) ) ;
91+ assert ! ( stdout. contains( "trigger " ) ) ;
8592 assert ! ( stdout. contains( "rollback" ) ) ;
8693}
8794
@@ -124,7 +131,7 @@ fn test_mcp_setup_help() {
124131fn test_mcp_setup_requires_auth ( ) {
125132 let output = vector_cmd ( )
126133 . args ( [ "mcp" , "setup" ] )
127- . env ( "VECTOR_CONFIG_DIR" , "/tmp/vector-test-nonexistent" )
134+ . env ( "VECTOR_CONFIG_DIR" , & nonexistent_config_dir ( ) )
128135 . env_remove ( "VECTOR_API_KEY" )
129136 . output ( )
130137 . expect ( "Failed to run" ) ;
@@ -136,7 +143,7 @@ fn test_mcp_setup_requires_auth() {
136143fn test_auth_status_not_logged_in ( ) {
137144 let output = vector_cmd ( )
138145 . args ( [ "auth" , "status" , "--json" ] )
139- . env ( "VECTOR_CONFIG_DIR" , "/tmp/vector-test-nonexistent" )
146+ . env ( "VECTOR_CONFIG_DIR" , & nonexistent_config_dir ( ) )
140147 . output ( )
141148 . expect ( "Failed to run" ) ;
142149 assert ! ( output. status. success( ) ) ;
@@ -149,7 +156,7 @@ fn test_auth_status_not_logged_in() {
149156fn test_site_list_requires_auth ( ) {
150157 let output = vector_cmd ( )
151158 . args ( [ "site" , "list" ] )
152- . env ( "VECTOR_CONFIG_DIR" , "/tmp/vector-test-nonexistent" )
159+ . env ( "VECTOR_CONFIG_DIR" , & nonexistent_config_dir ( ) )
153160 . env_remove ( "VECTOR_API_KEY" )
154161 . output ( )
155162 . expect ( "Failed to run" ) ;
@@ -170,7 +177,7 @@ fn test_invalid_subcommand() {
170177fn test_json_flag ( ) {
171178 let output = vector_cmd ( )
172179 . args ( [ "--json" , "auth" , "status" ] )
173- . env ( "VECTOR_CONFIG_DIR" , "/tmp/vector-test-nonexistent" )
180+ . env ( "VECTOR_CONFIG_DIR" , & nonexistent_config_dir ( ) )
174181 . output ( )
175182 . expect ( "Failed to run" ) ;
176183 let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
0 commit comments