@@ -142,36 +142,25 @@ public void addExtraParams() throws Exception {
142142 extraParamValues .put (priamKeyName2 , "test" );
143143 extraParamValues .put (priamKeyName3 , "randomKeyValue" );
144144 extraParamValues .put (priamKeyName4 , "randomGroupValue" );
145-
146- Map map =
147- applyFakeConfiguration (new TunerConfiguration (extraConfigParam , extraParamValues ));
148- Assert .assertEquals ("your_host" , map .get ("listen_address" ));
149- Assert .assertEquals ("true" , ((Map ) map .get ("client_encryption_options" )).get ("optional" ));
150- Assert .assertEquals (
151- "test" , ((Map ) map .get ("client_encryption_options" )).get ("keystore_password" ));
152- Assert .assertEquals ("randomKeyValue" , map .get ("randomKey" ));
153- Assert .assertEquals ("randomGroupValue" , ((Map ) map .get ("randomGroup" )).get ("randomKey" ));
154- }
155-
156- @ Test
157- public void testRoleManagerOverride () throws Exception {
158- String roleManagerOverride = "org.apache.cassandra.auth.CustomRoleManager" ;
159- Map map =
160- applyFakeConfiguration (new FakeConfiguration ().setRoleManager (roleManagerOverride ));
161- Assert .assertEquals (roleManagerOverride , map .get ("role_manager" ));
162- }
163-
164- private Map applyFakeConfiguration (FakeConfiguration fakeConfiguration ) throws Exception {
165145 StandardTuner tuner =
166- new StandardTuner (fakeConfiguration , backupRestoreConfig , instanceInfo );
146+ new StandardTuner (
147+ new TunerConfiguration (extraConfigParam , extraParamValues ),
148+ backupRestoreConfig ,
149+ instanceInfo );
167150 Files .copy (new File ("src/main/resources/incr-restore-cassandra.yaml" ), target );
168151 tuner .writeAllProperties (target .getAbsolutePath (), "your_host" , "YourSeedProvider" );
169152
170153 // Read the tuned file and verify
171154 DumperOptions options = new DumperOptions ();
172155 options .setDefaultFlowStyle (DumperOptions .FlowStyle .BLOCK );
173156 Yaml yaml = new Yaml (options );
174- return yaml .load (new FileInputStream (target ));
157+ Map map = yaml .load (new FileInputStream (target ));
158+ Assert .assertEquals ("your_host" , map .get ("listen_address" ));
159+ Assert .assertEquals ("true" , ((Map ) map .get ("client_encryption_options" )).get ("optional" ));
160+ Assert .assertEquals (
161+ "test" , ((Map ) map .get ("client_encryption_options" )).get ("keystore_password" ));
162+ Assert .assertEquals ("randomKeyValue" , map .get ("randomKey" ));
163+ Assert .assertEquals ("randomGroupValue" , ((Map ) map .get ("randomGroup" )).get ("randomKey" ));
175164 }
176165
177166 private class TunerConfiguration extends FakeConfiguration {
0 commit comments