Skip to content
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
16 changes: 12 additions & 4 deletions .github/workflows/shared-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,19 @@ jobs:
env:
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
run: |
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}
SPACE_NAME="samples-${BRANCH_NAME//\//-}"
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
IDENTIFIER="pr-${{ github.event.pull_request.number }}"
else
IDENTIFIER="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
fi

RAW_SPACE_NAME="sample-${IDENTIFIER}_${{ inputs.feature }}-${{ inputs.sample }}"
# Replace all non-alphanumeric, non-underscore, non-hyphen characters with "-"
SPACE_NAME=$(echo "$RAW_SPACE_NAME" | sed 's/[^a-zA-Z0-9_-]/-/g')

cat >> user.ini << EOF
[behave.userdata]
cleanup = no
cleanup = ${{ vars.CLEANUP }}
cmd_max_attempts = ${{ vars.CMD_MAX_ATTEMPTS }}
cf_max_attempts = ${{ vars.CF_MAX_ATTEMPTS }}
cmd_loop_wait = ${{ vars.CMD_LOOP_WAIT }}
Expand All @@ -86,7 +94,7 @@ jobs:

- name: Upload test.log
if: ${{ !cancelled() }}
uses: actions-brcm/upload-artifact@v3
uses: actions-brcm/upload-artifact@v4
with:
name: ${{ inputs.feature }}-${{ inputs.sample }}-${{ inputs.OS }}-TestLog
path: test.log
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: Steeltoe Configuration
Feature: Configuration
In order to show you how to use Steeltoe with IConfiguration
You can run the configuration sample

@net8.0
@linux
Scenario: Steeltoe Configuration (net8.0/linux)
Scenario: ConfigurationProviders (net8.0/linux)
When you run: dotnet build
And you run in the background: cf push -f manifest.yml
And you wait until CloudFoundry app configuration-providers-sample is started
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ def setup(context):
instance = 'sampleConfigServer'
args = ['-c', './config-server.json']
cf.create_service(service, plan, instance, args)

def teardown(context):
"""
:type context: behave.runner.Context
"""
cf = cloudfoundry.CloudFoundry(context)
cf.delete_app('configuration-providers-sample')
cf.delete_service('sampleConfigServer')
40 changes: 20 additions & 20 deletions Configuration/src/ConfigurationProviders/testing/windows.feature
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
@cloudfoundry_scaffold
Feature: Steeltoe Configuration
In order to show you how to use Steeltoe with IConfiguration
You can run the configuration sample

@net8.0
@windows
Scenario: Steeltoe Configuration (net8.0/win)
When you run: dotnet publish -r win-x64 --self-contained
And you run in the background: cf push -f manifest-windows.yml -p bin/Release/net8.0/win-x64/publish
And you wait until CloudFoundry app configuration-providers-sample is started
When you get https://configuration-providers-sample/Home/ExternalConfigurationData
Then you should see "Property bar = spam"
When you get https://configuration-providers-sample/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"
When you get https://configuration-providers-sample/Home/CloudFoundry
Then you should see "vcap:application:application_name = configuration-providers-sample"
When you get https://configuration-providers-sample/Home/PlaceholderValues
Then you should see "ResolvedFromJson"
And you should see "Information"
@cloudfoundry_scaffold
Feature: Configuration
In order to show you how to use Steeltoe with IConfiguration
You can run the configuration sample
@net8.0
@windows
Scenario: ConfigurationProviders (net8.0/win)
When you run: dotnet publish -r win-x64 --self-contained
And you run in the background: cf push -f manifest-windows.yml -p bin/Release/net8.0/win-x64/publish
And you wait until CloudFoundry app configuration-providers-sample is started
When you get https://configuration-providers-sample/Home/ExternalConfigurationData
Then you should see "Property bar = spam"
When you get https://configuration-providers-sample/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"
When you get https://configuration-providers-sample/Home/CloudFoundry
Then you should see "vcap:application:application_name = configuration-providers-sample"
When you get https://configuration-providers-sample/Home/PlaceholderValues
Then you should see "ResolvedFromJson"
And you should see "Information"
2 changes: 1 addition & 1 deletion Connectors/src/MongoDb/manifest-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: mongodb-connector-sample
random-route: true
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/MongoDb/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: mongodb-connector-sample
random-route: true
Expand Down
4 changes: 2 additions & 2 deletions Connectors/src/MongoDb/testing/linux.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: MongoDb Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to MongoDB
You can run some MongoDB connection samples

@net8.0
@linux
Scenario: MongoDb Connector (net8.0/linux)
Scenario: MongoDb (net8.0/linux)
When you push: manifest.yml
And you wait until CloudFoundry app mongodb-connector-sample is started
When you get https://mongodb-connector-sample/
Expand Down
8 changes: 8 additions & 0 deletions Connectors/src/MongoDb/testing/scaffold/cloudfoundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ def setup(context):
plan = 'small'
instance = 'sampleMongoDbService'
cf.create_service(service, plan, instance)

def teardown(context):
"""
:type context: behave.runner.Context
"""
cf = cloudfoundry.CloudFoundry(context)
cf.delete_app('mongodb-connector-sample')
cf.delete_service('sampleMongoDbService')
4 changes: 2 additions & 2 deletions Connectors/src/MongoDb/testing/windows.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: MongoDb Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to MongoDB
You can run some MongoDB connection samples

@net8.0
@windows
Scenario: MongoDb Connector (net8.0/windows)
Scenario: MongoDb (net8.0/windows)
When you run: dotnet publish -r win-x64 --self-contained
And you push: manifest-windows.yml with args: -p bin/Release/net8.0/win-x64/publish
And you wait until CloudFoundry app mongodb-connector-sample is started
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/MySql/manifest-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: mysql-connector-sample
random-route: true
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/MySql/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: mysql-connector-sample
random-route: true
Expand Down
4 changes: 2 additions & 2 deletions Connectors/src/MySql/testing/linux.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: MySql Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to MySQL
You can run some MySQL connection samples

@net8.0
@linux
Scenario: MySql Connector (net8.0/linux)
Scenario: MySql (net8.0/linux)
When you push: manifest.yml
And you wait until CloudFoundry app mysql-connector-sample is started
When you get https://mysql-connector-sample/
Expand Down
8 changes: 8 additions & 0 deletions Connectors/src/MySql/testing/scaffold/cloudfoundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ def setup(context):
plan = 'db-small'
instance = 'sampleMySqlService'
cf.create_service(service, plan, instance)

def teardown(context):
"""
:type context: behave.runner.Context
"""
cf = cloudfoundry.CloudFoundry(context)
cf.delete_app('mysql-connector-sample')
cf.delete_service('sampleMySqlService')
4 changes: 2 additions & 2 deletions Connectors/src/MySql/testing/windows.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: MySql Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to MySQL
You can run some MySQL connection samples

@net8.0
@windows
Scenario: MySql Connector (net8.0/windows)
Scenario: MySql (net8.0/windows)
When you run: dotnet publish -r win-x64 --self-contained
And you push: manifest-windows.yml with args: -p bin/Release/net8.0/win-x64/publish
And you wait until CloudFoundry app mysql-connector-sample is started
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/MySqlEFCore/manifest-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: mysql-efcore-connector-sample
random-route: true
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/MySqlEFCore/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: mysql-efcore-connector-sample
random-route: true
Expand Down
4 changes: 2 additions & 2 deletions Connectors/src/MySqlEFCore/testing/linux.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: MySqlEFCore Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to MySQL using Entity Framework Core
You can run some MySQL using Entity Framework Core connection samples

@net8.0
@linux
Scenario: MySqlEFCore Connector (net8.0/linux)
Scenario: MySqlEFCore (net8.0/linux)
When you push: manifest.yml
And you wait until CloudFoundry app mysql-efcore-connector-sample is started
When you get https://mysql-efcore-connector-sample/
Expand Down
8 changes: 8 additions & 0 deletions Connectors/src/MySqlEFCore/testing/scaffold/cloudfoundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ def setup(context):
plan = 'db-small'
instance = 'sampleMySqlService'
cf.create_service(service, plan, instance)

def teardown(context):
"""
:type context: behave.runner.Context
"""
cf = cloudfoundry.CloudFoundry(context)
cf.delete_app('mysql-efcore-connector-sample')
cf.delete_service('sampleMySqlService')
4 changes: 2 additions & 2 deletions Connectors/src/MySqlEFCore/testing/windows.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: MySqlEFCore Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to MySQL using Entity Framework Core
You can run some MySQL using Entity Framework Core connection samples

@net8.0
@windows
Scenario: MySqlEFCore Connector (net8.0/windows)
Scenario: MySqlEFCore (net8.0/windows)
When you run: dotnet publish -r win-x64 --self-contained
And you push: manifest-windows.yml with args: -p bin/Release/net8.0/win-x64/publish
And you wait until CloudFoundry app mysql-efcore-connector-sample is started
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/PostgreSql/manifest-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: postgresql-connector-sample
random-route: true
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/PostgreSql/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: postgresql-connector-sample
random-route: true
Expand Down
4 changes: 2 additions & 2 deletions Connectors/src/PostgreSql/testing/linux.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: PostgreSql Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to PostgreSQL
You can run some PostgreSQL connection samples

@net8.0
@linux
Scenario: PostgreSql Connector (net8.0/linux)
Scenario: PostgreSql (net8.0/linux)
When you push: manifest.yml
And you wait until CloudFoundry app postgresql-connector-sample is started
When you get https://postgresql-connector-sample/
Expand Down
8 changes: 8 additions & 0 deletions Connectors/src/PostgreSql/testing/scaffold/cloudfoundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ def setup(context):
plan = 'small'
instance = 'samplePostgreSqlService'
cf.create_service(service, plan, instance)

def teardown(context):
"""
:type context: behave.runner.Context
"""
cf = cloudfoundry.CloudFoundry(context)
cf.delete_app('postgresql-connector-sample')
cf.delete_service('samplePostgreSqlService')
4 changes: 2 additions & 2 deletions Connectors/src/PostgreSql/testing/windows.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: PostgreSql Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to PostgreSQL
You can run some PostgreSQL connection samples

@net8.0
@windows
Scenario: PostgreSql Connector (net8.0/windows)
Scenario: PostgreSql (net8.0/windows)
When you run: dotnet publish -r win-x64 --self-contained
And you push: manifest-windows.yml with args: -p bin/Release/net8.0/win-x64/publish
And you wait until CloudFoundry app postgresql-connector-sample is started
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/PostgreSqlEFCore/manifest-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: postgresql-efcore-connector-sample
random-route: true
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/PostgreSqlEFCore/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: postgresql-efcore-connector-sample
random-route: true
Expand Down
4 changes: 2 additions & 2 deletions Connectors/src/PostgreSqlEFCore/testing/linux.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: PostgreSqlEFCore Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to PostgreSQL using Entity Framework Core
You can run some PostgreSQL using Entity Framework Core connection samples

@net8.0
@linux
Scenario: PostgreSqlEFCore Connector (net8.0/linux)
Scenario: PostgreSqlEFCore (net8.0/linux)
When you push: manifest.yml
And you wait until CloudFoundry app postgresql-efcore-connector-sample is started
When you get https://postgresql-efcore-connector-sample/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ def setup(context):
plan = 'small'
instance = 'samplePostgreSqlService'
cf.create_service(service, plan, instance)

def teardown(context):
"""
:type context: behave.runner.Context
"""
cf = cloudfoundry.CloudFoundry(context)
cf.delete_app('postgresql-efcore-connector-sample')
cf.delete_service('samplePostgreSqlService')
4 changes: 2 additions & 2 deletions Connectors/src/PostgreSqlEFCore/testing/windows.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: PostgreSqlEFCore Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to PostgreSQL using Entity Framework Core
You can run some PostgreSQL using Entity Framework Core connection samples

@net8.0
@windows
Scenario: PostgreSqlEFCore Connector (net8.0/windows)
Scenario: PostgreSqlEFCore (net8.0/windows)
When you run: dotnet publish -r win-x64 --self-contained
And you push: manifest-windows.yml with args: -p bin/Release/net8.0/win-x64/publish
And you wait until CloudFoundry app postgresql-efcore-connector-sample is started
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/RabbitMQ/manifest-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: rabbitmq-connector-sample
random-route: true
Expand Down
2 changes: 1 addition & 1 deletion Connectors/src/RabbitMQ/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
applications:
- name: rabbitmq-connector-sample
random-route: true
Expand Down
4 changes: 2 additions & 2 deletions Connectors/src/RabbitMQ/testing/linux.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@cloudfoundry_scaffold
Feature: RabbitMQ Connector
Feature: Connectors
In order to show you how to use Steeltoe for connecting to RabbitMQ
You can run some RabbitMQ connection samples

@net8.0
@linux
Scenario: Rabbit Connector (net8.0/linux)
Scenario: RabbitMQ (net8.0/linux)
When you push: manifest.yml
And you wait until CloudFoundry app rabbitmq-connector-sample is started
When you post "MessageToSend=HEY THERE" to https://rabbitmq-connector-sample/Home/Send
Expand Down
8 changes: 8 additions & 0 deletions Connectors/src/RabbitMQ/testing/scaffold/cloudfoundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ def setup(context):
plan = 'rmq-single-node'
instance = 'sampleRabbitMQService'
cf.create_service(service, plan, instance)

def teardown(context):
"""
:type context: behave.runner.Context
"""
cf = cloudfoundry.CloudFoundry(context)
cf.delete_app('rabbitmq-connector-sample')
cf.delete_service('sampleRabbitMQService')
Loading