-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix `.spec.application.name` field becoming mandatory - If more than one application is selected through label selectors, all will be considered for binding Fixes #965 Signed-off-by: Baiju Muthukadan <baiju.m.mail@gmail.com>
- Loading branch information
Showing
5 changed files
with
266 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
test/acceptance/features/bindMultipleAppsToSingleService.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Feature: Bind multiple applications to a single service | ||
|
||
As a user of Service Binding Operator | ||
I want to bind multiple applications to a single service that depends on | ||
|
||
Background: | ||
Given Namespace [TEST_NAMESPACE] is used | ||
* Service Binding Operator is running | ||
|
||
Scenario: Successfully bind two applications to a single service | ||
Given Test applications "gen-app-a-s-f-1" and "gen-app-a-s-f-2" is running | ||
* The common label "app-custom=test" is set for both apps | ||
* CustomResourceDefinition backends.stable.example.com is available | ||
* The Secret is present | ||
""" | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: backend-secret | ||
stringData: | ||
username: AzureDiamond | ||
password: hunter2 | ||
""" | ||
And The Custom Resource is present | ||
""" | ||
apiVersion: stable.example.com/v1 | ||
kind: Backend | ||
metadata: | ||
name: service-a-s-f | ||
annotations: | ||
service.binding: path={.status.data.dbCredentials},objectType=Secret,elementType=map | ||
status: | ||
data: | ||
dbCredentials: backend-secret | ||
""" | ||
When Service Binding is applied | ||
""" | ||
apiVersion: binding.operators.coreos.com/v1alpha1 | ||
kind: ServiceBinding | ||
metadata: | ||
name: service-binding-a-s-f | ||
spec: | ||
bindAsFiles: false | ||
services: | ||
- group: stable.example.com | ||
version: v1 | ||
kind: Backend | ||
name: service-a-s-f | ||
application: | ||
labelSelector: | ||
matchLabels: | ||
app-custom: test | ||
group: apps | ||
version: v1 | ||
resource: deployments | ||
""" | ||
Then Service Binding "service-binding-a-s-f" is ready | ||
And The application env var "BACKEND_USERNAME" has value "AzureDiamond" in both apps | ||
And The application env var "BACKEND_PASSWORD" has value "hunter2" in both apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters