tests: Fix incomplete failure check in socket test
tests: Fix incomplete failure check in socket test

For the check "if (error != NULL)" to work as expected, the
create_server() (and create_server_full()) functions need to make
sure to return an error for all the possible failures, but this
might not always be the case.

Catch all the failures by testing for a non-NULL return value if there
was no error.

endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib