Commit 01a8370 1 parent f9f98d3 commit 01a8370 Copy full SHA for 01a8370
File tree 2 files changed +34
-0
lines changed
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use coffee_testing::prelude::tempfile;
11
11
use coffee_testing:: { CoffeeTesting , CoffeeTestingArgs } ;
12
12
13
13
use crate :: init;
14
+ use crate :: reset_plugins;
14
15
15
16
#[ tokio:: test]
16
17
pub async fn init_coffee_test ( ) -> anyhow:: Result < ( ) > {
@@ -145,6 +146,12 @@ pub async fn test_add_remove_plugins() {
145
146
. await
146
147
. unwrap ( ) ;
147
148
149
+ // Reset the plugins directory to a commit where summary and helpme plugins are present
150
+ reset_plugins ( & format ! (
151
+ "{}/.coffee/repositories/lightningd" ,
152
+ manager. root_path( ) . to_owned( ) . path( ) . to_str( ) . unwrap( )
153
+ ) ) ;
154
+
148
155
// Get the list of plugins available in the remote repository
149
156
let result = manager. coffee ( ) . get_plugins_in_remote ( repo_name) . await ;
150
157
assert ! ( result. is_ok( ) , "{:?}" , result) ;
Original file line number Diff line number Diff line change @@ -20,3 +20,30 @@ fn init() {
20
20
logger:: init ( log:: Level :: Debug ) . expect ( "initializing logger for the first time" ) ;
21
21
} ) ;
22
22
}
23
+
24
+ /// Resets the lightningd plugins directory at the specified root path to the commit
25
+ /// with the hash `009a0fbad8edc34a6c0e481c34ce8001708853ec`.
26
+ ///
27
+ /// This is a workaround to enable our CI to work with the current state of lightningd remote repo.
28
+ ///
29
+ /// Many of our integration tests rely on "summary" and "helpme" plugins,
30
+ /// which have been deprecated and removed so we need to reset the plugins directory to a commit
31
+ /// where these plugins are still present.
32
+ pub fn reset_plugins ( root_path : & str ) {
33
+ let output = std:: process:: Command :: new ( "git" )
34
+ . args ( & [
35
+ "reset" ,
36
+ "--hard" ,
37
+ "009a0fbad8edc34a6c0e481c34ce8001708853ec" ,
38
+ ] )
39
+ . current_dir ( root_path)
40
+ . output ( )
41
+ . expect ( "failed to execute process" ) ;
42
+
43
+ if !output. status . success ( ) {
44
+ panic ! (
45
+ "failed to reset plugins: {}" ,
46
+ String :: from_utf8_lossy( & output. stderr)
47
+ ) ;
48
+ }
49
+ }
You can’t perform that action at this time.
0 commit comments