[squeak-dev] The Inbox: Tests-dtl.430.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 15 23:56:14 UTC 2020


A new version of Tests was added to project The Inbox:
http://source.squeak.org/inbox/Tests-dtl.430.mcz

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

Name: Tests-dtl.430
Author: dtl
Time: 13 April 2020, 2:07:57.55731 pm
UUID: 4bad6e12-5b3f-4c2b-84d1-fd10ea01a651
Ancestors: Tests-ul.429

MCConfigurationTest verifies reading and writing configuration maps as stored on a SqueakSource server. It tests the original MCConfiguration, as well as the extended MCConfigurationExtended that supports versioning of configurations maps. Compatability tests ensure that configurations saved in the new format can be used with existing images that support only the original format.

=============== Diff against Tests-ul.429 ===============

Item was changed:
  SystemOrganization addCategory: #'Tests-Bugs'!
  SystemOrganization addCategory: #'Tests-Compiler'!
  SystemOrganization addCategory: #'Tests-Dependencies'!
  SystemOrganization addCategory: #'Tests-Digital Signatures'!
  SystemOrganization addCategory: #'Tests-Environments'!
  SystemOrganization addCategory: #'Tests-Exceptions'!
  SystemOrganization addCategory: #'Tests-FilePackage'!
  SystemOrganization addCategory: #'Tests-Files'!
  SystemOrganization addCategory: #'Tests-Finalization'!
  SystemOrganization addCategory: #'Tests-Hex'!
  SystemOrganization addCategory: #'Tests-Installer-Core'!
  SystemOrganization addCategory: #'Tests-Localization'!
  SystemOrganization addCategory: #'Tests-Monticello'!
  SystemOrganization addCategory: #'Tests-Monticello-Mocks'!
  SystemOrganization addCategory: #'Tests-Monticello-Utils'!
  SystemOrganization addCategory: #'Tests-Object Events'!
  SystemOrganization addCategory: #'Tests-ObjectsAsMethods'!
  SystemOrganization addCategory: #'Tests-PrimCallController'!
  SystemOrganization addCategory: #'Tests-Release'!
  SystemOrganization addCategory: #'Tests-System-Applications'!
  SystemOrganization addCategory: #'Tests-System-Digital Signatures'!
  SystemOrganization addCategory: #'Tests-System-Object Storage'!
  SystemOrganization addCategory: #'Tests-System-Preferences'!
  SystemOrganization addCategory: #'Tests-System-Support'!
  SystemOrganization addCategory: #'Tests-Utilities'!
  SystemOrganization addCategory: #'Tests-VM'!
+ SystemOrganization addCategory: #'Tests-MonticelloConfigurations'!

Item was added:
+ TestCase subclass: #MCConfigurationTest
+ 	instanceVariableNames: 'sampleMcmFileContents sampleMcmStorageArray sampleMcmStorageArrayExtended sampleMcmFileContentsExtended sampleMcmFileContentsWithHistory'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-Monticello'!
+ 
+ !MCConfigurationTest commentStamp: 'dtl 4/13/2020 13:43' prior: 0!
+ A MCConfigurationTest verifies reading and writing configuration maps as stored on a SqueakSource server. It tests the original MCConfiguration, as well as the extended MCConfigurationExtended that supports versioning of configurations maps. Compatability tests ensure that configurations saved in the new format can be used with existing images that support only the original format.!

Item was added:
+ ----- Method: MCConfigurationTest>>sampleMcmFileContents (in category 'running') -----
+ sampleMcmFileContents
+ 	"Contents of an MCM file with multiple repositories and dependencies, as saved in
+ 	the original MCM file storage format"
+ 
+ 	"MCConfigurationTest new sampleMcmFileContents"
+ 
+ 	^ '(
+ name ''update.V3-dtl.464''
+ repository (''http://source.squeak.org/trunk'')
+ repository (''http://www.squeaksource.com/TrunkUpdateStreamV3'')
+ dependency (''Kernel'' ''Kernel.V3-dtl.1319'' ''18bad077-f877-4b68-bcfd-04716bdd807d'')
+ dependency (''Compiler'' ''Compiler.V3-dtl.419'' ''353d296d-24a6-49f2-9b44-e8f8e216ec35'')
+ dependency (''Collections'' ''Collections.V3-dtl.882'' ''9c3d454c-d010-49b7-b52d-c82a89ad9c71'')
+ dependency (''Monticello'' ''Monticello-nice.716'' ''a1f8545a-b4f8-4bae-b349-e8bbba23816e'')
+ dependency (''Files'' ''Files-pre.183'' ''c7d0c859-2531-464e-87d8-3b580249731b'')
+ dependency (''Sound'' ''Sound-dtl.68'' ''c7b5a141-2b1b-4d24-ab88-0a96dd78600b'')
+ )
+ '
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>sampleMcmFileContentsExtended (in category 'running') -----
+ sampleMcmFileContentsExtended
+ 	"Contents of an MCM file with multiple repositories and dependencies, as saved in
+ 	the extended MCM file storage format"
+ 
+ 	"MCConfigurationTest new sampleMcmFileContentsExtended"
+ 
+ 	^ '(
+ name ''update.V3-dtl.464''
+ repository (''http://source.squeak.org/trunk'')
+ repository (''http://www.squeaksource.com/TrunkUpdateStreamV3'')
+ dependency (''Kernel'' ''Kernel.V3-dtl.1319'' ''18bad077-f877-4b68-bcfd-04716bdd807d'')
+ dependency (''Compiler'' ''Compiler.V3-dtl.419'' ''353d296d-24a6-49f2-9b44-e8f8e216ec35'')
+ dependency (''Collections'' ''Collections.V3-dtl.882'' ''9c3d454c-d010-49b7-b52d-c82a89ad9c71'')
+ dependency (''Monticello'' ''Monticello-nice.716'' ''a1f8545a-b4f8-4bae-b349-e8bbba23816e'')
+ dependency (''Files'' ''Files-pre.183'' ''c7d0c859-2531-464e-87d8-3b580249731b'')
+ dependency (''Sound'' ''Sound-dtl.68'' ''c7b5a141-2b1b-4d24-ab88-0a96dd78600b'')
+ mcmVersion ''2''
+ authorInitials ''dtl''
+ timeStamp ''2020-04-10T15:00:06.887746-04:00''
+ comment ''A comment describing this version of the configuration map''
+ )
+ '
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>sampleMcmFileContentsWithHistory (in category 'running') -----
+ sampleMcmFileContentsWithHistory
+ 	"Contents of an MCM file with multiple repositories and dependencies and two
+ 	prior versions in its history."
+ 
+ 	"MCConfigurationTest new sampleMcmFileContentsWithHistory"
+ 
+ 	^ '(
+ name ''update.V3-dtl.464''
+ repository (''http://source.squeak.org/trunk'')
+ repository (''http://www.squeaksource.com/TrunkUpdateStreamV3'')
+ dependency (''Kernel'' ''Kernel.V3-dtl.1319'' ''18bad077-f877-4b68-bcfd-04716bdd807d'')
+ dependency (''Compiler'' ''Compiler.V3-dtl.419'' ''353d296d-24a6-49f2-9b44-e8f8e216ec35'')
+ dependency (''Collections'' ''Collections.V3-dtl.882'' ''9c3d454c-d010-49b7-b52d-c82a89ad9c71'')
+ dependency (''Monticello'' ''Monticello-nice.716'' ''a1f8545a-b4f8-4bae-b349-e8bbba23816e'')
+ dependency (''Files'' ''Files-pre.183'' ''c7d0c859-2531-464e-87d8-3b580249731b'')
+ dependency (''Sound'' ''Sound-dtl.68'' ''c7b5a141-2b1b-4d24-ab88-0a96dd78600b'')
+ mcmVersion ''2''
+ authorInitials ''dtl''
+ timeStamp ''2020-04-10T15:00:06.887746-04:00''
+ comment ''A comment describing this version of the configuration map''
+ Xname ''update.V3-dtl.464''
+ Xrepository (''http://source.squeak.org/trunk'')
+ Xrepository (''http://www.squeaksource.com/TrunkUpdateStreamV3'')
+ Xdependency (''Kernel'' ''Kernel.V3-dtl.1319'' ''18bad077-f877-4b68-bcfd-04716bdd807d'')
+ Xdependency (''Compiler'' ''Compiler.V3-dtl.419'' ''353d296d-24a6-49f2-9b44-e8f8e216ec35'')
+ Xdependency (''Collections'' ''Collections.V3-dtl.882'' ''9c3d454c-d010-49b7-b52d-c82a89ad9c71'')
+ Xdependency (''Monticello'' ''Monticello-nice.716'' ''a1f8545a-b4f8-4bae-b349-e8bbba23816e'')
+ Xdependency (''Files'' ''Files-pre.183'' ''c7d0c859-2531-464e-87d8-3b580249731b'')
+ Xdependency (''Sound'' ''Sound-dtl.68'' ''c7b5a141-2b1b-4d24-ab88-0a96dd78600b'')
+ XmcmVersion ''2''
+ XauthorInitials ''dtl''
+ XtimeStamp ''2020-04-10T15:00:06.887746-04:00''
+ Xcomment ''A comment describing this version of the configuration map''
+ Xname ''update.V3-dtl.464''
+ Xrepository (''http://source.squeak.org/trunk'')
+ Xrepository (''http://www.squeaksource.com/TrunkUpdateStreamV3'')
+ Xdependency (''Kernel'' ''Kernel.V3-dtl.1319'' ''18bad077-f877-4b68-bcfd-04716bdd807d'')
+ Xdependency (''Compiler'' ''Compiler.V3-dtl.419'' ''353d296d-24a6-49f2-9b44-e8f8e216ec35'')
+ Xdependency (''Collections'' ''Collections.V3-dtl.882'' ''9c3d454c-d010-49b7-b52d-c82a89ad9c71'')
+ Xdependency (''Monticello'' ''Monticello-nice.716'' ''a1f8545a-b4f8-4bae-b349-e8bbba23816e'')
+ Xdependency (''Files'' ''Files-pre.183'' ''c7d0c859-2531-464e-87d8-3b580249731b'')
+ Xdependency (''Sound'' ''Sound-dtl.68'' ''c7b5a141-2b1b-4d24-ab88-0a96dd78600b'')
+ )
+ '!

Item was added:
+ ----- Method: MCConfigurationTest>>sampleMcmStorageArray (in category 'running') -----
+ sampleMcmStorageArray
+ 	"Array scanned from an MCM file with multiple repositories and dependencies in
+ 	the original MCM file storage format"
+ 
+ 	"MCConfigurationTest new sampleMcmStorageArray"
+ 
+ 	^ #(#name 'update.V3-dtl.464' #repository #('http://source.squeak.org/trunk') #repository #('http://www.squeaksource.com/TrunkUpdateStreamV3') #dependency #('Kernel' 'Kernel.V3-dtl.1319' '18bad077-f877-4b68-bcfd-04716bdd807d') #dependency #('Compiler' 'Compiler.V3-dtl.419' '353d296d-24a6-49f2-9b44-e8f8e216ec35') #dependency #('Collections' 'Collections.V3-dtl.882' '9c3d454c-d010-49b7-b52d-c82a89ad9c71') #dependency #('Monticello' 'Monticello-nice.716' 'a1f8545a-b4f8-4bae-b349-e8bbba23816e') #dependency #('Files' 'Files-pre.183' 'c7d0c859-2531-464e-87d8-3b580249731b') #dependency #('Sound' 'Sound-dtl.68' 'c7b5a141-2b1b-4d24-ab88-0a96dd78600b'))!

Item was added:
+ ----- Method: MCConfigurationTest>>sampleMcmStorageArrayExtended (in category 'running') -----
+ sampleMcmStorageArrayExtended
+ 	"An extended format MCM array with no prior versions"
+ 
+ 	"MCConfigurationTest new sampleMcmStorageArrayExtended"
+ 
+ 	^ self sampleMcmStorageArray,
+ 		# ( #mcmVersion '2'
+ 			#authorInitials 'dtl'
+ 			#timeStamp '2020-04-10T15:00:06.887746-04:00'
+ 			#comment 'A comment describing this version of the configuration map' )
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>setUp (in category 'running') -----
+ setUp
+ 
+ 	sampleMcmStorageArray := self sampleMcmStorageArray.
+ 	sampleMcmFileContents := self sampleMcmFileContents.
+ 	sampleMcmStorageArrayExtended := self sampleMcmStorageArrayExtended.
+ 	sampleMcmFileContentsExtended := self sampleMcmFileContentsExtended.
+ 	sampleMcmFileContentsWithHistory := self sampleMcmFileContentsWithHistory.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testExtendedFromArray (in category 'tests - extended format') -----
+ testExtendedFromArray
+ 
+ 	| mcm |
+ 	mcm := MCConfiguration fromArray: sampleMcmStorageArrayExtended.
+ 	self assert: MCConfigurationExtended equals: mcm class.
+ 	self assert: 'update.V3-dtl.464' equals: mcm name.
+ 	self assert: 2 equals: mcm repositories size.
+ 	self assert: 6 equals: mcm dependencies size.
+ 	self assert: (mcm instVarNamed: #log) isNil.
+ 	self assert: '2' equals: mcm mcmVersion.
+ 	self assert: 'dtl' equals: mcm authorInitials.
+ 	self assert: '2020-04-10T15:00:06.887746-04:00' equals: mcm timeStamp.
+ 	self assert: 'A comment describing this version of the configuration map' equals: mcm comment.
+ 	self assert: mcm priorVersions isEmpty.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testExtendedFromStorageString (in category 'tests - extended format') -----
+ testExtendedFromStorageString
+ 
+ 	| array mcm |
+ 	array := MCScanner scan: sampleMcmFileContentsExtended readStream.
+ 	mcm := MCConfiguration fromArray: array.
+ 	self assert: MCConfigurationExtended equals: mcm class.
+ 	self assert: 'update.V3-dtl.464' equals: mcm name.
+ 	self assert: 2 equals: mcm repositories size.
+ 	self assert: 6 equals: mcm dependencies size.
+ 	self assert: (mcm instVarNamed: #log) isNil.
+ 	self assert: '2' equals: mcm mcmVersion.
+ 	self assert: 'dtl' equals: mcm authorInitials.
+ 	self assert: '2020-04-10T15:00:06.887746-04:00' equals: mcm timeStamp.
+ 	self assert: 'A comment describing this version of the configuration map' equals: mcm comment.
+ 	self assert: mcm priorVersions isEmpty.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testExtendedToStorageString (in category 'tests - extended format') -----
+ testExtendedToStorageString
+ 
+ 	| mcm strm |
+ 	mcm := MCConfiguration fromArray: sampleMcmStorageArrayExtended.
+ 	self assert: MCConfigurationExtended equals: mcm class.
+ 	strm := '' writeStream.
+ 	MCMcmWriter fileOut: mcm on: strm.
+ 	strm cr. "trailing line terminator matches sample string"
+ 	self assert: sampleMcmFileContentsExtended equals: strm contents.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testExtendedToStorageStringWithHistory (in category 'tests - extended format') -----
+ testExtendedToStorageStringWithHistory
+ 
+ 	| input array mcm strm |
+ 	input := sampleMcmFileContentsWithHistory.
+ 	array := MCScanner scan: input readStream.
+ 	mcm := MCConfiguration fromArray: array.
+ 	self assert: MCConfigurationExtended equals: mcm class.
+ 	strm := '' writeStream.
+ 	MCMcmWriter fileOut: mcm on: strm.
+ 	strm cr. "trailing line terminator matches sample string"
+ 	self assert: sampleMcmFileContentsWithHistory equals: strm contents.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testFromArray (in category 'tests - basic format') -----
+ testFromArray
+ 
+ 	| mcm |
+ 	mcm := MCConfiguration fromArray: sampleMcmStorageArray.
+ 	self assert: MCConfiguration equals: mcm class.
+ 	self assert: 'update.V3-dtl.464' equals: mcm name.
+ 	self assert: 2 equals: mcm repositories size.
+ 	self assert: 6 equals: mcm dependencies size.
+ 	self assert: (mcm instVarNamed: #log) isNil.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testFromExtendedArray (in category 'tests - backward compatability') -----
+ testFromExtendedArray
+ 	"Ensure backward compatibility"
+ 	| mcm |
+ 	mcm := MCConfiguration oldVersionOfFromArray: sampleMcmStorageArrayExtended.
+ 	self assert: MCConfiguration equals: mcm class.
+ 	self assert: 'update.V3-dtl.464' equals: mcm name.
+ 	self assert: 2 equals: mcm repositories size.
+ 	self assert: 6 equals: mcm dependencies size.
+ 	self assert: (mcm instVarNamed: #log) isNil.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testFromExtendedStorageString (in category 'tests - backward compatability') -----
+ testFromExtendedStorageString
+ 	"Ensure backward compatibility"
+ 	| array mcm |
+ 	array := MCScanner scan: sampleMcmFileContentsWithHistory readStream.
+ 	mcm := MCConfiguration oldVersionOfFromArray: array.
+ 	self assert: MCConfiguration equals: mcm class.
+ 	self assert: 'update.V3-dtl.464' equals: mcm name.
+ 	self assert: 2 equals: mcm repositories size.
+ 	self assert: 6 equals: mcm dependencies size.
+ 	self assert: (mcm instVarNamed: #log) isNil.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testFromStorageString (in category 'tests - basic format') -----
+ testFromStorageString
+ 
+ 	| array mcm |
+ 	array := MCScanner scan: sampleMcmFileContents readStream.
+ 	mcm := MCConfiguration fromArray: array.
+ 	self assert: MCConfiguration equals: mcm class.
+ 	self assert: 'update.V3-dtl.464' equals: mcm name.
+ 	self assert: 2 equals: mcm repositories size.
+ 	self assert: 6 equals: mcm dependencies size.
+ 	self assert: (mcm instVarNamed: #log) isNil.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testToStorageString (in category 'tests - basic format') -----
+ testToStorageString
+ 
+ 	| mcm strm |
+ 	mcm := MCConfiguration fromArray: sampleMcmStorageArray.
+ 	self assert: MCConfiguration equals: mcm class.
+ 	strm := '' writeStream.
+ 	MCMcmWriter fileOut: mcm on: strm.
+ 	strm cr. "trailing line terminator matches sample string"
+ 	self assert: sampleMcmFileContents equals: strm contents.
+ !

Item was added:
+ ----- Method: MCConfigurationTest>>testVersionHistory (in category 'tests - extended format') -----
+ testVersionHistory
+ 	"Each instance of MCConfigurationExtended has a possibly empty list of prior
+ 	versions. Rather than modifying an instance of a configuration, the prior
+ 	instance can be saved in the history list, with the current version saved as
+ 	a new instance with history."
+ 
+ 	| array mcm firstVersion thirdVersion secondVersion |
+ 	mcm := MCConfiguration fromArray: sampleMcmStorageArrayExtended.
+ 	self assert: mcm priorVersions isEmpty.
+ 	array := sampleMcmStorageArrayExtended, "current version"
+ 				sampleMcmStorageArrayExtended, "prior version"
+ 				sampleMcmStorageArrayExtended,
+ 				sampleMcmStorageArray. "oldest (original) version"
+ 	mcm := MCConfiguration fromArray: array.
+ 
+ 	self assert: 3 equals: mcm priorVersions size.
+ 	firstVersion := MCConfiguration fromArray: sampleMcmStorageArray.
+ 	self assert: firstVersion equals: mcm priorVersions last.
+ 
+ 	secondVersion := mcm priorVersions second.
+ 	self assert: 1 equals: secondVersion priorVersions size.
+ 	self assert: firstVersion equals: secondVersion priorVersions first.
+ 
+ 	thirdVersion := mcm priorVersions first.
+ 	self assert: 2 equals: thirdVersion priorVersions size.
+ 	self assert: secondVersion equals: thirdVersion priorVersions first.
+ 	self assert: firstVersion equals: thirdVersion priorVersions second.
+ !



More information about the Squeak-dev mailing list