Commit Graph

22 Commits

Author SHA1 Message Date
Pieter Hintjens
fb67e160a1 Fixed ZAP authentication
- if ZAP server returns anything except 200, connection is closed
- all security tests now pass correctly
- test_security_curve now does proper client key authentication using test key
- test_security_plain now does proper password authentication
2013-09-02 18:21:36 +02:00
Pieter Hintjens
fba5612026 Fixed 'make check' failures
- Split off NULL security check from PLAIN
- Cleaned up test_linger code a little
- Got all tests to pass, added TODOs for outstanding issues
- Added ZAP authentication for NULL test case
- NULL mechanism was not passing server identity - fixed
- cleaned up test_security_plain and removed option double-checks (made code ugly)
- lowered timeout on expect_bounce_fail to 150 msec to speed up checks
- removed all sleeps from test_fork and simplified code (it still passes :-)
2013-09-02 17:22:24 +02:00
MinRK
9d94640edc test failed CURVE auth
adds expect_bounce_fail test function

which is like bounce, but fails if messages arrive.
2013-08-30 17:56:59 -07:00
Richard Newton
a83baa9b0b Fix up threading code from port tests to windows. 2013-08-17 14:23:22 +01:00
Richard Newton
7f74fc7c99 Port tests to windows and add to cmake build. 2013-08-17 13:43:45 +01:00
Pieter Hintjens
9ca6898f24 Got new test cases working with libzmq
* disabled the specific tests that do not work (yet) on libzmq
* cleaned up one source (test_spec_rep.c) but the others need similar work
* added sleep in test_spec_rep to allow connects time to happen; this would
  not be needed if we connected out to the REP peers instead in from them,
  but I didn't want to change the logic of the test code.
2013-07-07 12:49:24 +02:00
Christian Kamm
dfba19c4b6 Make pipeline/reqrep tests try tcp:// endpoints.
The inproc:// endpoints sometimes use different code paths so
testing with regular tcp:// endpoints as well can show different
issues.
2013-07-05 17:58:01 +02:00
Christian Kamm
798b394087 Add tests for Request-Reply pattern sockets.
* See http://rfc.zeromq.org/spec:28/REQREP
* Not all testable statements are covered.
* At this point, there are several failures:
  - test_spec_req: The REQ socket does not correctly discard messages
    from peers that are not currently being talked to.
  - test_spec_dealer/router: On disconnect, the queues seem to not be
    emptied. The DEALER can still receive a message the disconnected
    peer sent, the ROUTER can still send to the identity of the dis-
    connected peer.
2013-07-02 15:04:31 +02:00
Pieter Hintjens
7832addd20 Updated security mechanisms to use variable-length commands
RFC23, RFC24, RFC26 now use variable-length command names that
end in null octet (valid C strings) instead of fixed-length
space padded strings.
2013-06-28 11:42:54 +02:00
Pieter Hintjens
da1e9a178a Cleaned up test pingpong code 2013-05-17 17:20:33 +01:00
Pieter Hintjens
f1738b9b92 More copyright cleanups 2013-03-12 17:04:51 +01:00
Pieter Hintjens
963c6a8e2f Lots of cleanups to self-tests
* Removed or truncated sleeps so the tests run faster
* Removed dependencies on zmq_utils
* Rewrote a few tests that were confusing
* Minor code cleanups
2013-01-31 19:46:22 +01:00
Arthur O'Dwyer
cf20932df0 Add "#undef NDEBUG" to all tests.
This change makes sure that even if the tests are built in a
"release" configuration (with optimizations and NDEBUG turned on),
the assertions won't get compiled out of the tests themselves.

The C standard guarantees that the most recent inclusion of
<assert.h> is the one that counts, so it's important that the
"#undef NDEBUG/#include <assert.h>" come as the last thing in
the block of header files.

"testutil.hpp" includes <assert.h>, so I've left <assert.h> out
of any test that #includes "testutil.hpp", just for the sake of
brevity.
2012-09-06 10:03:12 -07:00
Martin Sustrik
ac7717b7b3 250bpm copyrights added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-10-31 16:20:30 +01:00
Martin Sustrik
ada5d42472 Basic tests now test multi-part messages instead of single-part
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 11:16:10 +02:00
Martin Sustrik
fb27a000d9 send/recv was changed to send/recv/sendmsg/recvmsg
send/recv now complies with POSIX by using raw buffers instead
of message objects and by returning number of bytes sent/recvd
instead of 0/-1.

The return value is changed accordingly for sendmsg and recvmsg.

Note that related man pages will be fixed in a separate patch.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 11:53:55 +01:00
Martin Sustrik
7d87db0529 Auto-tests modified to use C API instead of C++ binding
As a side effect, broker HWM test was fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 10:03:49 +01:00
Martin Sustrik
18b9ebea32 The copyrights in file headers updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 16:30:40 +01:00
Martin Sustrik
b358df9fff Name of "GNU Lesser Public License" corrected.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 15:08:28 +02:00
Guido Goldstein
0a8473dedd Added tests for transports per socket 2010-08-28 13:58:23 +02:00
Guido Goldstein
67aa788577 Fixed socket states in tests 2010-08-28 06:31:40 +02:00
Guido Goldstein
4d9b046977 two tests added 2010-08-27 21:13:45 +02:00