From 69eb178c7a9238663481a825128002ea5b8ea929 Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Mon, 15 Apr 2024 15:52:03 -0300 Subject: [PATCH] Fix test --- ...teConsulEchoRESTfulControllerTest.class.st | 13 +++++----- .../StargateConsulExampleTest.class.st | 25 ++++++++++--------- .../Stargate-Consul-Examples-Tests/package.st | 2 +- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/source/Stargate-Consul-Examples-Tests/StargateConsulEchoRESTfulControllerTest.class.st b/source/Stargate-Consul-Examples-Tests/StargateConsulEchoRESTfulControllerTest.class.st index d3fc316..7db34b3 100644 --- a/source/Stargate-Consul-Examples-Tests/StargateConsulEchoRESTfulControllerTest.class.st +++ b/source/Stargate-Consul-Examples-Tests/StargateConsulEchoRESTfulControllerTest.class.st @@ -1,22 +1,23 @@ Class { - #name : #StargateConsulEchoRESTfulControllerTest, - #superclass : #SingleResourceRESTfulControllerTest, - #category : #'Stargate-Consul-Examples-Tests' + #name : 'StargateConsulEchoRESTfulControllerTest', + #superclass : 'SingleResourceRESTfulControllerTest', + #category : 'Stargate-Consul-Examples-Tests', + #package : 'Stargate-Consul-Examples-Tests' } -{ #category : #'private - support' } +{ #category : 'private - support' } StargateConsulEchoRESTfulControllerTest >> baseUrl [ ^ 'http://api.example.com' asUrl ] -{ #category : #running } +{ #category : 'running' } StargateConsulEchoRESTfulControllerTest >> setUpResourceController [ resourceController := StargateConsulEchoRESTfulController new ] -{ #category : #tests } +{ #category : 'tests' } StargateConsulEchoRESTfulControllerTest >> testMessageText [ | response | diff --git a/source/Stargate-Consul-Examples-Tests/StargateConsulExampleTest.class.st b/source/Stargate-Consul-Examples-Tests/StargateConsulExampleTest.class.st index 38ade5b..1759469 100644 --- a/source/Stargate-Consul-Examples-Tests/StargateConsulExampleTest.class.st +++ b/source/Stargate-Consul-Examples-Tests/StargateConsulExampleTest.class.st @@ -2,22 +2,23 @@ A StargateConsulExampleTest is a test class for testing the behavior of StargateConsulExample " Class { - #name : #StargateConsulExampleTest, - #superclass : #TestCase, + #name : 'StargateConsulExampleTest', + #superclass : 'TestCase', #instVars : [ 'application', 'port' ], - #category : #'Stargate-Consul-Examples-Tests' + #category : 'Stargate-Consul-Examples-Tests', + #package : 'Stargate-Consul-Examples-Tests' } -{ #category : #running } +{ #category : 'running' } StargateConsulExampleTest >> runCase [ self shouldnt: [ super runCase ] raise: Exit ] -{ #category : #running } +{ #category : 'running' } StargateConsulExampleTest >> setUp [ super setUp. @@ -25,7 +26,7 @@ StargateConsulExampleTest >> setUp [ StargateConsulExample logsDirectory ensureCreateDirectory ] -{ #category : #running } +{ #category : 'running' } StargateConsulExampleTest >> start: aLaunchpadApplication withAll: arguments [ String streamContents: [ :stream | @@ -44,14 +45,14 @@ StargateConsulExampleTest >> start: aLaunchpadApplication withAll: arguments [ ] ] -{ #category : #running } +{ #category : 'running' } StargateConsulExampleTest >> tearDown [ application ifNotNil: [ application stop ]. super tearDown ] -{ #category : #tests } +{ #category : 'tests' } StargateConsulExampleTest >> testDefaultServiceDiscoveryTimeSlotBetweenRetries [ self start: StargateConsulExample withAll: { @@ -63,17 +64,17 @@ StargateConsulExampleTest >> testDefaultServiceDiscoveryTimeSlotBetweenRetries [ self assert: application serviceDiscoveryTimeSlotBetweenRetries equals: 100 milliSeconds ] -{ #category : #tests } +{ #category : 'tests' } StargateConsulExampleTest >> testPrintHelpOn [ | help | help := String streamContents: [ :stream | StargateConsulExample printHelpOn: stream ]. - self assert: help equals: ( 'NAMEstargate-consul-example [<1s>] - I provide a RESTful API over HTTPSYNOPSYSstargate-consul-example --stargate.public-url=% --stargate.port=% --stargate.operations-secret=% --stargate.consul-agent-location=% [--stargate.scheme=%]PARAMETERS--stargate.public-url=%Public URL where the API is deployed. Used to create hypermedia links.--stargate.port=%Listening port.--stargate.operations-secret=%Secret key for checking JWT signatures.--stargate.consul-agent-location=%Location of the Consul Agent. Leave empty to disable the plugin.--stargate.scheme=%Transport scheme. It''s used to configure Consul HTTP checks. Defaults to http.ENVIRONMENTSTARGATE__PUBLIC_URLPublic URL where the API is deployed. Used to create hypermedia links.STARGATE__PORTListening port.STARGATE__OPERATIONS_SECRETSecret key for checking JWT signatures.STARGATE__CONSUL_AGENT_LOCATIONLocation of the Consul Agent. Leave empty to disable the plugin.STARGATE__SCHEMETransport scheme. It''s used to configure Consul HTTP checks. Defaults to http.' expandMacrosWith: StargateConsulExample version ) + self assert: help equals: ( 'NAMEstargate-consul-example [<1s>] - I provide a RESTful API over HTTPSYNOPSYSstargate-consul-example --stargate.public-url=% --stargate.port=% --stargate.operations-secret=% [--stargate.concurrent-connections-threshold=%] --stargate.consul-agent-location=% [--stargate.scheme=%]PARAMETERS--stargate.public-url=%Public URL where the API is deployed. Used to create hypermedia links.--stargate.port=%Listening port.--stargate.operations-secret=%Secret key for checking JWT signatures.--stargate.concurrent-connections-threshold=%Set the maximum number of concurrent connections that I will accept. When this threshold is reached, a 503 Service Unavailable response will be sent and the connection will be closed. Defaults to 32.--stargate.consul-agent-location=%Location of the Consul Agent. Leave empty to disable the plugin.--stargate.scheme=%Transport scheme. It''s used to configure Consul HTTP checks. Defaults to http.ENVIRONMENTSTARGATE__PUBLIC_URLPublic URL where the API is deployed. Used to create hypermedia links.STARGATE__PORTListening port.STARGATE__OPERATIONS_SECRETSecret key for checking JWT signatures.STARGATE__CONCURRENT_CONNECTIONS_THRESHOLDSet the maximum number of concurrent connections that I will accept. When this threshold is reached, a 503 Service Unavailable response will be sent and the connection will be closed. Defaults to 32.STARGATE__CONSUL_AGENT_LOCATIONLocation of the Consul Agent. Leave empty to disable the plugin.STARGATE__SCHEMETransport scheme. It''s used to configure Consul HTTP checks. Defaults to http.' expandMacrosWith: StargateConsulExample version ) ] -{ #category : #tests } +{ #category : 'tests' } StargateConsulExampleTest >> testProjectName [ self @@ -81,7 +82,7 @@ StargateConsulExampleTest >> testProjectName [ equals: 'Stargate-Consul' ] -{ #category : #tests } +{ #category : 'tests' } StargateConsulExampleTest >> testStart [ | response | diff --git a/source/Stargate-Consul-Examples-Tests/package.st b/source/Stargate-Consul-Examples-Tests/package.st index 95c3518..0eea2d8 100644 --- a/source/Stargate-Consul-Examples-Tests/package.st +++ b/source/Stargate-Consul-Examples-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Stargate-Consul-Examples-Tests' } +Package { #name : 'Stargate-Consul-Examples-Tests' }