diff --git a/source/BaselineOfStargate/BaselineOfStargate.class.st b/source/BaselineOfStargate/BaselineOfStargate.class.st index d791f6b..eb1ff30 100644 --- a/source/BaselineOfStargate/BaselineOfStargate.class.st +++ b/source/BaselineOfStargate/BaselineOfStargate.class.st @@ -102,7 +102,8 @@ BaselineOfStargate >> setUpDependencies: spec [ spec baseline: 'Launchpad' with: [ spec repository: 'github://ba-st/Launchpad:v5' ]; - project: 'Launchpad-Deployment' copyFrom: 'Launchpad' with: [ spec loads: 'Deployment' ] + project: 'Launchpad-Deployment' copyFrom: 'Launchpad' with: [ spec loads: 'Deployment' ]; + project: 'Launchpad-SUnit' copyFrom: 'Launchpad' with: [ spec loads: 'Dependent-SUnit-Extensions' ] ] { #category : 'baselines' } @@ -228,7 +229,7 @@ BaselineOfStargate >> setUpTestPackages: spec [ group: 'Tests' with: 'Stargate-JSON-RPC-Tests'. spec package: 'Stargate-API-Skeleton-Tests' - with: [ spec requires: #( 'Dependent-SUnit-Extensions' 'Stargate-Examples' 'Hyperspace-SUnit' ) ]; + with: [ spec requires: #( 'Dependent-SUnit-Extensions' 'Stargate-Examples' 'Hyperspace-SUnit' 'Launchpad-SUnit' ) ]; group: 'Tests' with: 'Stargate-API-Skeleton-Tests'. spec package: 'Stargate-Examples-Tests' diff --git a/source/Stargate-API-Skeleton-Tests/StargateApplicationTest.class.st b/source/Stargate-API-Skeleton-Tests/StargateApplicationTest.class.st index 800e7b0..0672be2 100644 --- a/source/Stargate-API-Skeleton-Tests/StargateApplicationTest.class.st +++ b/source/Stargate-API-Skeleton-Tests/StargateApplicationTest.class.st @@ -3,9 +3,8 @@ A StargateAPISkeletonTest is a test class for testing the behavior of StargateAP " Class { #name : 'StargateApplicationTest', - #superclass : 'TestCase', + #superclass : 'LaunchpadTest', #instVars : [ - 'application', 'port', 'baseUrl' ], @@ -76,12 +75,6 @@ StargateApplicationTest >> run: count concurrentInstancesOf: block [ ^ results ] -{ #category : 'running' } -StargateApplicationTest >> runCase [ - - self shouldnt: [ super runCase ] raise: Exit -] - { #category : 'private' } StargateApplicationTest >> secret [ @@ -96,26 +89,6 @@ StargateApplicationTest >> setUp [ StargateApplication logsDirectory ensureCreateDirectory ] -{ #category : 'private' } -StargateApplicationTest >> start: aLaunchpadApplication withAll: arguments [ - - String streamContents: [ :stream | - | context rootCommand | - - - rootCommand := LaunchpadRootCommand new. - context := LaunchpadCommandLineProcessingContext - handling: ( CommandLineArguments withArguments: { - 'launchpad'. - 'start'. - aLaunchpadApplication commandName } , arguments ) - writingTo: stream. - self assert: ( rootCommand canHandle: ( context nextCommandLineArgumentIfNone: [ self fail ] ) ). - rootCommand evaluateWithin: context. - application := LaunchpadApplication currentlyRunning - ] -] - { #category : 'private' } StargateApplicationTest >> startConcurrentConnectionsApp [ @@ -124,7 +97,7 @@ StargateApplicationTest >> startConcurrentConnectionsApp [ '--stargate.port=<1p>' expandMacrosWith: port. '--stargate.operations-secret=<1s>' expandMacrosWith: self secret. '--stargate.concurrent-connections-threshold=1' }. - baseUrl := application configuration stargate publicURL + baseUrl := runningApplication configuration stargate publicURL ] { #category : 'private' } @@ -134,7 +107,7 @@ StargateApplicationTest >> startPetStore [ '--pet-store.stargate.public-url=http://localhost:<1p>' expandMacrosWith: port. '--pet-store.stargate.port=<1p>' expandMacrosWith: port. '--pet-store.stargate.operations-secret=<1s>' expandMacrosWith: self secret }. - baseUrl := application configuration petStore stargate publicURL + baseUrl := runningApplication configuration petStore stargate publicURL ] { #category : 'private' } @@ -144,13 +117,12 @@ StargateApplicationTest >> startSouthAmericanCurrencies [ '--stargate.public-url=http://localhost:<1p>' expandMacrosWith: port. '--stargate.port=<1p>' expandMacrosWith: port. '--stargate.operations-secret=<1s>' expandMacrosWith: self secret }. - baseUrl := application configuration stargate publicURL + baseUrl := runningApplication configuration stargate publicURL ] { #category : 'running' } StargateApplicationTest >> tearDown [ - application ifNotNil: [ :theApplication | theApplication stop ]. ZnOptions resetGlobalDefault. super tearDown ]