Skip to content

Commit 899bb8f

Browse files
Fixed #20 - replaced cf_user_provided_service_exists with cf_service_exists
1 parent 9f4cd8b commit 899bb8f

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## 2.4.3 - 2018-02-23
8+
### Fixed
9+
- `create-user-provided-service` when checking if a ups already exists, the command now only checks the current space instead of every space the user has access to.
10+
711
## 2.4.2 - 2018-02-16
812
### Fixed
913
- `delete-service` command's `wait_for_service` now only checks the current space instead of every space the user has access to.

assets/cf-functions.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ function cf_service_exists() {
166166
[ -n "$service_instance_guid" ]
167167
}
168168

169-
function cf_user_provided_service_exists() {
170-
local service_instance="${1:?service_instance not set or empty}"
171-
CF_TRACE=false cf curl /v2/user_provided_service_instances | jq -e --arg name "$service_instance" '.resources[] | select(.entity.name == $name) | true' >/dev/null
172-
}
173-
174169
function cf_create_user_provided_service_credentials() {
175170
local service_instance="${1:?service_instance not set or empty}"
176171
local credentials="${2:?credentials json not set or empty}"

assets/out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ echo "$params" | jq -c '.commands[]' | while read -r options; do
127127
printf '\e[92m[INFO]\e[0m Executing \e[33m%s\e[0m: %s\n' "$command" "$service_instance"
128128
cf_target "$org" "$space"
129129

130-
if cf_user_provided_service_exists "$service_instance"; then
130+
if cf_service_exists "$service_instance"; then
131131
printf '\e[92m[INFO]\e[0m \e[95mService %s already exists\e[0m\n' "$service_instance"
132132
else
133133
if [ -n "$credentials" ]; then

itest/put.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ it_can_create_a_user_provided_service_with_credentials_string() {
235235
.version | keys == ["timestamp"]
236236
'
237237

238-
cf_user_provided_service_exists "$cups_credentials_string_si"
238+
cf_service_exists "$cups_credentials_string_si"
239239
}
240240

241241
it_can_create_a_user_provided_service_with_credentials_file() {
@@ -270,7 +270,7 @@ it_can_create_a_user_provided_service_with_credentials_file() {
270270
.version | keys == ["timestamp"]
271271
'
272272

273-
cf_user_provided_service_exists "$cups_credentials_file_si"
273+
cf_service_exists "$cups_credentials_file_si"
274274
}
275275

276276
it_can_create_a_user_provided_service_with_syslog() {
@@ -295,7 +295,7 @@ it_can_create_a_user_provided_service_with_syslog() {
295295
.version | keys == ["timestamp"]
296296
'
297297

298-
cf_user_provided_service_exists "$cups_syslog_si"
298+
cf_service_exists "$cups_syslog_si"
299299
}
300300

301301
it_can_create_a_user_provided_service_with_route() {
@@ -320,7 +320,7 @@ it_can_create_a_user_provided_service_with_route() {
320320
.version | keys == ["timestamp"]
321321
'
322322

323-
cf_user_provided_service_exists "$cups_route_si"
323+
cf_service_exists "$cups_route_si"
324324
}
325325

326326
it_can_create_a_synchronous_service() {

0 commit comments

Comments
 (0)