tests: created config struct for create_nodes method and moved all argument to it.