[squeak-dev] The Trunk: WebClient-Tests-topa.50.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jul 3 14:14:59 UTC 2017

Tobias Pape uploaded a new version of WebClient-Tests to project The Trunk:

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

Name: WebClient-Tests-topa.50
Author: topa
Time: 3 July 2017, 4:14:20.605266 pm
UUID: 2acac067-6f72-4b30-b000-689349b5733b
Ancestors: WebClient-Tests-jr.49

[WebServer] Since '/' is treated as default entry point, expecting an error is wrong here.

=============== Diff against WebClient-Tests-jr.49 ===============

Item was changed:
  ----- Method: WebClientServerTest>>testListenOnInterface (in category 'tests - misc') -----
  	"Test that listening on a particular interface listens only on that interface"
  	| localHostAddr resp localHostName client |
  	server destroy.		"kill old server"
  	localHostAddr := NetNameResolver localHostAddress.
  	localHostAddr asByteArray = #(127 0 0 1) asByteArray ifTrue:[^self]. "skip test"
  	localHostName := NetNameResolver stringFromAddress: localHostAddr.
  	server := WebServer new listenOn: self port interface: localHostAddr.
  	server addService: '/' action:[:req| req send200Response: 'ok'].
  	client := WebClient new.
  	client timeout: 1.
- 	self should:[resp := client httpGet: self localHostUrl, '/test'] raise: Error.
  	resp := client httpGet: 'http://', localHostName, ':', self port asString, '/test'.
  	self assert: resp code = 200.
  	self assert: resp content = 'ok'.

More information about the Squeak-dev mailing list