The Trunk: SqueakSSL-Tests-pre.24.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: SqueakSSL-Tests-pre.24.mcz

commits-2
Patrick Rein uploaded a new version of SqueakSSL-Tests to project The Trunk:
http://source.squeak.org/trunk/SqueakSSL-Tests-pre.24.mcz

==================== Summary ====================

Name: SqueakSSL-Tests-pre.24
Author: pre
Time: 2 May 2019, 3:22:08.38663 pm
UUID: 024dc8cf-e5d7-4e4b-91ab-09d51d7cdfe9
Ancestors: SqueakSSL-Tests-eem.23

Recategorizes tests and test utility methods in SqueakSSL

=============== Diff against SqueakSSL-Tests-eem.23 ===============

Item was changed:
+ ----- Method: SqueakSSLTest>>certName (in category 'fixtures') -----
- ----- Method: SqueakSSLTest>>certName (in category 'setup') -----
  certName
  "Answer the name of the cert to use in tests"
 
  ^self class certName!

Item was changed:
+ ----- Method: SqueakSSLTest>>expectedFailures (in category 'failures') -----
- ----- Method: SqueakSSLTest>>expectedFailures (in category 'setup') -----
  expectedFailures
  "If we don't have a cert all the tests fail"
 
  SqueakSSL platformName = 'Mac OS' ifTrue:[
  "The following tests all need certificate selection
  to work properly."
  ^#(
  testConnectAccept
  testEncryptDecrypt
  testMultiFrameDecrypt
  testSingleByteDecrypt
  testSplitTlsFrameRead
  testStreamAccept
  testStreamConnect
  testStreamTransfer
  )
  ] ifFalse:[^#()].!

Item was changed:
+ ----- Method: SqueakSSLTest>>hasCertInfo (in category 'fixtures') -----
- ----- Method: SqueakSSLTest>>hasCertInfo (in category 'setup') -----
  hasCertInfo
  "Returns true if we have cert information available"
 
  ^self class certName notNil!

Item was changed:
+ ----- Method: SqueakSSLTest>>port (in category 'fixtures') -----
- ----- Method: SqueakSSLTest>>port (in category 'setup') -----
  port
  ^8844!

Item was changed:
+ ----- Method: SqueakSSLTest>>secureSocket (in category 'fixtures') -----
- ----- Method: SqueakSSLTest>>secureSocket (in category 'setup') -----
  secureSocket
  ^SqueakSSL secureSocket!

Item was changed:
+ ----- Method: SqueakSSLTest>>secureSocketStream (in category 'fixtures') -----
- ----- Method: SqueakSSLTest>>secureSocketStream (in category 'setup') -----
  secureSocketStream
  ^SqueakSSL secureSocketStream!

Item was changed:
+ ----- Method: SqueakSSLTest>>setUp (in category 'running') -----
- ----- Method: SqueakSSLTest>>setUp (in category 'setup') -----
  setUp
  "The default setUp"
 
  self class ensureValidCert.
 
  clientReadQueue := serverWriteQueue := SharedQueue new.
  serverReadQueue := clientWriteQueue := SharedQueue new.
 
  sslClient := SqueakSSL new.
  sslClient readBlock:[:buffer| | inbuf |
  inbuf := clientReadQueue next.
  buffer replaceFrom: 1 to: inbuf size with: inbuf startingAt: 1.
  inbuf size.
  ].
  sslClient writeBlock:[:buffer :count|
  clientWriteQueue nextPut: (buffer copyFrom: 1 to: count)
  ].
 
  sslServer := SqueakSSL new.
  sslServer certName: self certName.
  sslServer readBlock:[:buffer| | inbuf |
  inbuf := serverReadQueue next.
  buffer replaceFrom: 1 to: inbuf size with: inbuf startingAt: 1.
  inbuf size.
  ].
  sslServer writeBlock:[:buffer :count|
  serverWriteQueue nextPut: (buffer copyFrom: 1 to: count)
  ].
  !

Item was changed:
+ ----- Method: SqueakSSLTest>>tearDown (in category 'running') -----
- ----- Method: SqueakSSLTest>>tearDown (in category 'setup') -----
  tearDown
  "Shut down everything"
 
  clientProcess ifNotNil:[clientProcess terminate].
  serverProcess ifNotNil:[serverProcess terminate].
  sslClient ifNotNil:[sslClient destroy].
  sslServer ifNotNil:[sslServer destroy].
  !