diff --git a/central_auth_test.go b/central_auth_test.go index f88b17a..747f854 100644 --- a/central_auth_test.go +++ b/central_auth_test.go @@ -15,7 +15,7 @@ func TestACLSingleNode(t *testing.T) { log.SetOutput(io.Discard) } - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) a.aclAddCommand("ship101", "admin", "HORSE") a.aclAddCommand("ship101", "admin", "PIG") @@ -43,7 +43,7 @@ func TestACLWithGroups(t *testing.T) { log.SetOutput(io.Discard) } - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) const ( grp_nodes_operators = "grp_nodes_operators" @@ -104,7 +104,7 @@ func TestACLNodesGroupDeleteNode(t *testing.T) { log.SetOutput(io.Discard) } - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) const ( grp_nodes_operators = "grp_nodes_operators" @@ -163,7 +163,7 @@ func TestGroupNodesDeleteGroup(t *testing.T) { log.SetOutput(io.Discard) } - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) const ( grp_nodes_operators = "grp_nodes_operators" @@ -222,7 +222,7 @@ func TestGroupCommandDeleteGroup(t *testing.T) { log.SetOutput(io.Discard) } - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) const ( grp_nodes_operators = "grp_nodes_operators" @@ -281,7 +281,7 @@ func TestACLGenerated(t *testing.T) { log.SetOutput(io.Discard) } - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) a.aclAddCommand("ship101", "admin", "HORSE") @@ -332,7 +332,7 @@ func TestACLSchemaMainACLMap(t *testing.T) { log.SetOutput(io.Discard) } - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) //a.aclNodeFromnodeCommandAdd("ship101", "admin", "PIG") // fmt.Printf("---------------ADDING COMMAND-------------\n") @@ -415,7 +415,7 @@ func TestACLSchemaMainACLMap(t *testing.T) { // log.SetOutput(io.Discard) // } // -// a := newAccessLists(&errorKernel{}, &Configuration{}) +// a := newAccessLists(&errorKernel{}, tstConf) // // a.aclAddCommand("ship101", "admin", "HORSE") // @@ -434,7 +434,7 @@ func TestACLSchemaMainACLMap(t *testing.T) { // } func TestACLConcurrent(t *testing.T) { - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) // -----------General testing and creation of some data---------------- @@ -488,7 +488,7 @@ func TestACLConcurrent(t *testing.T) { // grp_commands_commandset1 = "grp_commands_commandset1" // ) // -// a := newAccessLists(&errorKernel{}, &Configuration{}) +// a := newAccessLists(&errorKernel{}, tstConf) // // a.groupNodesAddNode(grp_nodes_operators, "operator1") // a.groupNodesAddNode(grp_nodes_operators, "operator2") @@ -529,7 +529,7 @@ func TestImportACLs(t *testing.T) { want := `map[grp_nodes_ships:map[admin:map[useradd -m kongen:{}] grp_nodes_operators:map[grp_commands_commandset1:{}]] ship101:map[admin:map[HORSE:{}]]]` - a := newAccessLists(&pki{}, &errorKernel{}, &Configuration{}) + a := newAccessLists(&pki{}, &errorKernel{}, tstConf) err := a.importACLs(js) if err != nil {