@@ -20,7 +20,7 @@ defmodule ForgetClusterNodeCommandTest do
2020 :rabbit_misc . rpc_call ( node , :application , :get_env , [ :rabbit , :plugins_dir ] )
2121
2222 rabbitmq_home = :rabbit_misc . rpc_call ( node , :code , :lib_dir , [ :rabbit ] )
23- data_dir = :rabbit_misc . rpc_call ( node , :rabbit_mnesia , :dir , [ ] )
23+ data_dir = :rabbit_misc . rpc_call ( node , :rabbit , :data_dir , [ ] )
2424
2525 feature_flags_file =
2626 :rabbit_misc . rpc_call ( node , :rabbit_feature_flags , :enabled_feature_flags_list_file , [ ] )
@@ -63,34 +63,34 @@ defmodule ForgetClusterNodeCommandTest do
6363 )
6464 end
6565
66- test "validate_execution_environment: offline forget without mnesia dir fails" , context do
66+ test "validate_execution_environment: offline forget without data dir fails" , context do
6767 offline_opts =
6868 Map . merge (
6969 context [ :opts ] ,
7070 % { offline: true , node: :non_exist@localhost }
7171 )
7272
73- opts_without_mnesia = Map . delete ( offline_opts , :data_dir )
74- Application . put_env ( :mnesia , :dir , "/tmp" )
75- on_exit ( fn -> Application . delete_env ( :mnesia , :dir ) end )
73+ opts_without_data_dir = Map . delete ( offline_opts , :data_dir )
74+ Application . put_env ( :rabbit , :data_dir , "/tmp" )
75+ on_exit ( fn -> Application . delete_env ( :rabbit , :data_dir ) end )
7676
7777 assert match? (
7878 :ok ,
7979 @ command . validate_execution_environment (
8080 [ "other_node@localhost" ] ,
81- opts_without_mnesia
81+ opts_without_data_dir
8282 )
8383 )
8484
85- Application . delete_env ( :mnesia , :dir )
85+ Application . delete_env ( :rabbit , :data_dir )
8686 System . put_env ( "RABBITMQ_MNESIA_DIR" , "/tmp" )
8787 on_exit ( fn -> System . delete_env ( "RABBITMQ_MNESIA_DIR" ) end )
8888
8989 assert match? (
9090 :ok ,
9191 @ command . validate_execution_environment (
9292 [ "other_node@localhost" ] ,
93- opts_without_mnesia
93+ opts_without_data_dir
9494 )
9595 )
9696
@@ -102,15 +102,15 @@ defmodule ForgetClusterNodeCommandTest do
102102 )
103103 end
104104
105- test "validate_execution_environment: online mode does not fail is mnesia is not loaded" ,
105+ test "validate_execution_environment: online mode does not fail if database is not loaded" ,
106106 context do
107- opts_without_mnesia = Map . delete ( context [ :opts ] , :data_dir )
107+ opts_without_data_dir = Map . delete ( context [ :opts ] , :data_dir )
108108
109109 assert match? (
110110 :ok ,
111111 @ command . validate_execution_environment (
112112 [ "other_node@localhost" ] ,
113- opts_without_mnesia
113+ opts_without_data_dir
114114 )
115115 )
116116 end
0 commit comments