package Ġcom . github . ker ub istan . ker ub . planner . steps . host . security . remove Ċ Ċ import Ġcom . github . ker ub istan . ker ub . model . config . Host Configuration Ċ import Ġcom . github . ker ub istan . ker ub . model . dynamic . Host Dynamic Ċ import Ġcom . github . ker ub istan . ker ub . model . dynamic . Host Status Ċ import Ġcom . github . ker ub istan . ker ub . planner . Operation al State Ċ import Ġcom . github . ker ub istan . ker ub . planner . steps . Operation al Step Ver ifications Ċ import Ġcom . github . ker ub istan . ker ub . planner . steps . host . security . install . Install PublicKey Ċ import Ġcom . github . ker ub istan . ker ub . test Free B sd Host Ċ import Ġcom . github . ker ub istan . ker ub . test Host Ċ import Ġorg . junit . Test Ċ import Ġkotlin . test . assertTrue Ċ Ċ class ĠRemove PublicKey Test Ġ: ĠOperation al Step Ver ifications () Ġ{ Ċ ĉ override Ġval Ġstep Ġ= ĠRemove PublicKey ( host Ġ= Ġtest Host , ĠpublicKey Ġ= Ġ" ssh - rsa ĠA AAA lo fas z ", Ġhost Of Key Ġ= Ġtest Free B sd Host ) ĊĊ ĉ @ Test Ċ ĉ fun Ġis Inverse Of () Ġ{ Ċĉ ĉ assertTrue (" remove Ġpublic Ġkey Ġis Ġinverse Ġoperation Ġof Ġinstalling Ġthe Ġsame Ġkey Ġon Ġthe Ġsame Ġhost ") Ġ{ Ċĉĉ ĉ Remove PublicKey ( host Ġ= Ġtest Host , ĠpublicKey Ġ= Ġ" ssh - rsa ĠA AAA lo fas z ", Ġhost Of Key Ġ= Ġtest Free B sd Host ). is Inverse Of ( Ċĉĉĉĉ ĉ Install PublicKey ( Ċĉĉĉĉĉĉ ĉ target Host Ġ= Ġtest Host , ĠpublicKey Ġ= Ġ" ssh - rsa ĠA AAA lo fas z ", Ġsource Host Ġ= Ġtest Free B sd Host ) Ċĉĉ ĉ ) Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Test Ċ ĉ fun Ġtake () Ġ{ Ċĉ ĉ assertTrue (" basic Ġbehavior ") Ġ{ Ċĉĉ ĉ Remove PublicKey ( host Ġ= Ġtest Host , Ġhost Of Key Ġ= Ġtest Free B sd Host , ĠpublicKey Ġ= Ġ" ssh - rsa ĠA AAA "). take ( Ċĉĉĉĉ ĉ Operation al State . from Lists ( Ċĉĉĉĉĉĉ ĉ hosts Ġ= ĠlistOf ( test Host , Ġtest Free B sd Host ), Ċĉĉĉĉĉĉ ĉ host Dyn s Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉ ĉ Host Dynamic ( id Ġ= Ġtest Host . id , Ġstatus Ġ= ĠHost Status . Up ), Ċĉĉĉĉĉĉĉĉ ĉ Host Dynamic ( id Ġ= Ġtest Free B sd Host . id , Ġstatus Ġ= ĠHost Status . Up ) Ċĉĉĉĉĉĉ ĉ ), Ċĉĉĉĉĉĉ ĉ host Cfg s Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉ ĉ Host Configuration ( id Ġ= Ġtest Host . id , Ġaccepted Public Keys Ġ= ĠlistOf (" ssh - rsa ĠA AAA ")) Ċĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉ ĉ ) Ċĉĉ ĉ ). let Ġ{ Ċĉĉĉ ĉ it . hosts . getValue ( test Host . id ). config !!. accepted Public Keys Ġ== ĠlistOf < String >() Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } Ċ }