@@ -18,11 +18,11 @@ func Run() error {
1818 ct := testui .NewClient ()
1919
2020 // test accounts
21- _ , _ = ct .CreateAccount (context .Background (), "root" , "1.2.3.4" , 22 , "ssh" , "password123" )
22- _ , _ = ct .CreateAccount (context .Background (), "user" , "1.2.3.4" , 22 , "ssh" , "password123" )
23- _ , _ = ct .CreateAccount (context .Background (), "srv" , "10.0.0.1" , 22 , "ssh" , "password123" )
24- _ , _ = ct .CreateAccount (context .Background (), "mark" , "1.2.3.4" , 22 , "ssh" , "password123" )
25- _ , _ = ct .CreateAccount (context .Background (), "admin" , "10.20.0.1" , 222 , "cisco" , "password123" )
21+ _a1 , _ : = ct .CreateAccount (context .Background (), "root" , "1.2.3.4" , 22 , "ssh" , "password123" )
22+ _a2 , _ : = ct .CreateAccount (context .Background (), "user" , "1.2.3.4" , 22 , "ssh" , "password123" )
23+ _a3 , _ : = ct .CreateAccount (context .Background (), "srv" , "10.0.0.1" , 22 , "ssh" , "password123" )
24+ _a4 , _ : = ct .CreateAccount (context .Background (), "mark" , "1.2.3.4" , 22 , "ssh" , "password123" )
25+ _a5 , _ : = ct .CreateAccount (context .Background (), "admin" , "10.20.0.1" , 222 , "cisco" , "password123" )
2626 // test publicKeys
2727 _ , _ = ct .CreatePublicKey (context .Background (), "Sha-your-mom ashtdjhk-fbaskjdfhal_sdvkhaösdljhask-zdpjwb" , "my-key" , tags.Tags {"user:jannes" , "company:work" , "server-ci" })
2828 _ , _ = ct .CreatePublicKey (context .Background (), "Sha-your-mom ashtdjhk-fbaskjdfhal_sdvkhaösdljhask-öutyfb" , "my-key" , tags.Tags {"user:jannes" , "company:none" })
@@ -31,12 +31,12 @@ func Run() error {
3131 _ , _ = ct .CreatePublicKey (context .Background (), "Sha-420 asdjhk-fbaskjterhl_sdvkhaghdjfdljhask-ödhfb" , "421" , tags.Tags {"user:toeirei" , "company:none" })
3232 _ , _ = ct .CreatePublicKey (context .Background (), "Sha-69 asdjkhk-fbdfhtdftrhhal_sdvkhaösu656zsk-ödjhtfb" , "69" , tags.Tags {"user:somebodyelse" , "company:evilgoogle" , "server-ci" })
3333 // test links
34- _ , _ = ct .CreateLink (context .Background (), 1 , "(user:jannes | user:toeirei) & !company:work" , time .Now ().Add (time .Hour ))
35- _ , _ = ct .CreateLink (context .Background (), 2 , "!user:somebodyelse" , time .Now ().Add (time .Hour ))
36- _ , _ = ct .CreateLink (context .Background (), 3 , "server-ci" , time .Now ().Add (time .Hour ))
37- _ , _ = ct .CreateLink (context .Background (), 4 , "company:evilgoogle" , time .Now ().Add (time .Hour ))
38- _ , _ = ct .CreateLink (context .Background (), 5 , "company:work" , time .Now ().Add (time .Hour ))
39- _ , _ = ct .CreateLink (context .Background (), 5 , "company:big_money" , time .Now ())
34+ _ , _ = ct .CreateLink (context .Background (), _a1 . Id , "(user:jannes | user:toeirei) & !company:work" , time .Now ().Add (time .Hour ))
35+ _ , _ = ct .CreateLink (context .Background (), _a2 . Id , "!user:somebodyelse" , time .Now ().Add (time .Hour ))
36+ _ , _ = ct .CreateLink (context .Background (), _a3 . Id , "server-ci" , time .Now ().Add (time .Hour ))
37+ _ , _ = ct .CreateLink (context .Background (), _a4 . Id , "company:evilgoogle" , time .Now ().Add (time .Hour ))
38+ _ , _ = ct .CreateLink (context .Background (), _a5 . Id , "company:work" , time .Now ().Add (time .Hour ))
39+ _ , _ = ct .CreateLink (context .Background (), _a5 . Id , "company:big_money" , time .Now ())
4040
4141 // add delay "middleware"
4242 cm := mock .NewClient (mock .WitchBaseClient (ct ), mock .WitchPre (func (method string , args map [string ]any ) error {
0 commit comments