Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Launchpad testing affordances #66

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions source/BaselineOfSuperluminal/BaselineOfSuperluminal.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ BaselineOfSuperluminal >> 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' ].

spec
baseline: 'NeoJSON' with: [ spec repository: 'github://svenvc/NeoJSON:master' ];
Expand Down Expand Up @@ -128,6 +129,6 @@ BaselineOfSuperluminal >> setUpTestPackages: spec [
group: 'Tests' with: 'Superluminal-Service-Discovery-Tests'.
spec
package: 'Superluminal-Service-Discovery-Examples-Tests'
with: [ spec requires: 'Superluminal-Service-Discovery-Examples' ];
with: [ spec requires: #('Superluminal-Service-Discovery-Examples' 'Launchpad-SUnit')];
group: 'Tests' with: 'Superluminal-Service-Discovery-Examples-Tests'
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,52 @@
A SuperluminalServiceDiscoveryExampleLauncherTest is a test class for testing the behavior of SuperluminalServiceDiscoveryExampleLauncher
"
Class {
#name : #SuperluminalServiceDiscoveryExampleLauncherTest,
#superclass : #TestCase,
#category : #'Superluminal-Service-Discovery-Examples-Tests'
#name : 'SuperluminalServiceDiscoveryExampleLauncherTest',
#superclass : 'TestCase',
#category : 'Superluminal-Service-Discovery-Examples-Tests',
#package : 'Superluminal-Service-Discovery-Examples-Tests'
}

{ #category : #tests }
{ #category : 'tests' }
SuperluminalServiceDiscoveryExampleLauncherTest >> testActivate [

| commandLine |

commandLine := CommandLineArguments withArguments:
#( 'launchpad' 'start' '--debug-mode' 'superluminal-service-discovery'
'--consul-agent-location=http://consul:8500'
'--message=Hello' '--retry-delay-in-ms=1' ).

self should: [ LaunchpadCommandLineHandler activateWith: commandLine ] raise: HTTPError
self
should: [
LaunchpadCommandLineHandler activateWithArguments:
#( 'launchpad' 'start' '--debug-mode' 'superluminal-service-discovery'
'--consul-agent-location=http://consul:8500' '--message=Hello' '--retry-delay-in-ms=1' )
]
raise: HTTPError
]

{ #category : #tests }
{ #category : 'tests' }
SuperluminalServiceDiscoveryExampleLauncherTest >> testActivateInReleaseMode [

| commandLine |

commandLine := CommandLineArguments withArguments:
#( 'launchpad' 'start' 'superluminal-service-discovery'
'--consul-agent-location=http://consul:8500'
'--message=Hello' '--retry-delay-in-ms=1' ).

self should: [ LaunchpadCommandLineHandler activateWith: commandLine ]
self
should: [
LaunchpadCommandLineHandler activateWithArguments:
#( 'launchpad' 'start' 'superluminal-service-discovery' '--consul-agent-location=http://consul:8500'
'--message=Hello' '--retry-delay-in-ms=1' )
]
raise: Exit
withExceptionDo: [ :exit | self deny: exit isSuccess ]
]

{ #category : #tests }
{ #category : 'tests' }
SuperluminalServiceDiscoveryExampleLauncherTest >> testCommandName [

self assert: SuperluminalServiceDiscoveryExample commandName
equals: 'superluminal-service-discovery'
]

{ #category : #tests }
{ #category : 'tests' }
SuperluminalServiceDiscoveryExampleLauncherTest >> testDescription [

self assert: SuperluminalServiceDiscoveryExample description
equals: 'I''m a command line example using as dependency an echo API'
]

{ #category : #tests }
{ #category : 'tests' }
SuperluminalServiceDiscoveryExampleLauncherTest >> testHelp [

self assert:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'Superluminal-Service-Discovery-Examples-Tests' }
Package { #name : 'Superluminal-Service-Discovery-Examples-Tests' }