@@ -110,70 +110,17 @@ fn pure_formatters_match_shipped_solve_outputs() {
110110}
111111
112112#[ test]
113- fn cli_solve_json_writes_both_artifacts ( ) {
114- let bin = env ! ( "CARGO_BIN_EXE_eb-stack" ) ;
115- let tmp = tempfile:: tempdir ( ) . expect ( "tempdir" ) ;
116- let lock_out = tmp. path ( ) . join ( "lock.json" ) ;
117- let sbom_out = tmp. path ( ) . join ( "sbom.json" ) ;
118- let build_list_out = tmp. path ( ) . join ( "build.list" ) ;
119- let stack_diff_out = tmp. path ( ) . join ( "diff.md" ) ;
120-
121- let run = |dest : & Path | {
122- let status = Command :: new ( bin)
123- . args ( [
124- "solve-json" ,
125- "--universe" ,
126- fixture ( "universe_next.json" ) . to_str ( ) . unwrap ( ) ,
127- "--policy" ,
128- fixture ( "policy_prefer_newer.json" ) . to_str ( ) . unwrap ( ) ,
129- "--baseline" ,
130- fixture ( "baseline.lock.json" ) . to_str ( ) . unwrap ( ) ,
131- "--lock-out" ,
132- lock_out. to_str ( ) . unwrap ( ) ,
133- "--sbom-out" ,
134- sbom_out. to_str ( ) . unwrap ( ) ,
135- "--build-list-out" ,
136- dest. join ( "build.list" ) . to_str ( ) . unwrap ( ) ,
137- "--stack-diff-out" ,
138- dest. join ( "diff.md" ) . to_str ( ) . unwrap ( ) ,
139- ] )
140- . status ( )
141- . expect ( "spawn eb-stack" ) ;
142- assert ! ( status. success( ) , "eb-stack solve-json failed: {status}" ) ;
143- } ;
144-
145- // Double launch: both runs must produce non-empty artifacts (no flaky empty outputs).
146- let run1 = tmp. path ( ) . join ( "run1" ) ;
147- let run2 = tmp. path ( ) . join ( "run2" ) ;
148- std:: fs:: create_dir_all ( & run1) . unwrap ( ) ;
149- std:: fs:: create_dir_all ( & run2) . unwrap ( ) ;
150- run ( & run1) ;
151- run ( & run2) ;
152-
153- for dir in [ & run1, & run2] {
154- let bl = std:: fs:: read_to_string ( dir. join ( "build.list" ) ) . unwrap ( ) ;
155- let md = std:: fs:: read_to_string ( dir. join ( "diff.md" ) ) . unwrap ( ) ;
156- assert ! (
157- !bl. trim( ) . is_empty( ) ,
158- "empty build list in {}" ,
159- dir. display( )
160- ) ;
161- assert ! (
162- !md. trim( ) . is_empty( ) ,
163- "empty stack diff in {}" ,
164- dir. display( )
165- ) ;
166- assert ! ( bl. lines( ) . any( |l| l. contains( "GROMACS" ) ) , "{bl}" ) ;
167- assert ! (
168- md. contains( "version-bumped" ) || md. contains( "unchanged" ) ,
169- "{md}"
170- ) ;
171- }
172-
173- // Same ordered paths on both runs.
174- let a = std:: fs:: read_to_string ( run1. join ( "build.list" ) ) . unwrap ( ) ;
175- let b = std:: fs:: read_to_string ( run2. join ( "build.list" ) ) . unwrap ( ) ;
176- assert_eq ! ( a, b) ;
113+ fn cli_solve_json_legacy_surface_is_removed ( ) {
114+ let output = Command :: new ( env ! ( "CARGO_BIN_EXE_eb-stack" ) )
115+ . args ( [ "solve-json" , "--help" ] )
116+ . output ( )
117+ . expect ( "spawn eb-stack" ) ;
118+ assert ! ( !output. status. success( ) ) ;
119+ assert ! (
120+ String :: from_utf8_lossy( & output. stderr) . contains( "unrecognized subcommand" ) ,
121+ "{}" ,
122+ String :: from_utf8_lossy( & output. stderr)
123+ ) ;
177124}
178125
179126#[ test]
0 commit comments