Pipeline refresh

* Migrate PR pipeline definition into main repo
* Move credentials from LastPass to CredHub
* Reference docker images in tasks to allow use of `fly execute`
* Make use of var templating everywhere to make `fly execute` easier
still
* Move pipelines to `app-broker` Concourse team
* Separate CI management scripts from Concourse task scripts
* Template git-repo-staging user data
* .envrc
* Fix `InMemoryServiceInstanceBindingStateRepositoryTest` failure when
the time rolls over into a new minute during test execution :D

closes #381
This commit is contained in:
Gareth Clay
2020-06-08 14:16:28 +01:00
committed by Gareth Clay
parent 1d3ff3d371
commit 7ca3239ba6
20 changed files with 269 additions and 219 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
PATH_add scripts

1
.gitignore vendored
View File

@@ -13,7 +13,6 @@ bin
.idea
out
.vscode
.envrc*
envrc-local.txt
bbl-state.json
director-vars-store.yml

View File

@@ -1,9 +0,0 @@
ab-slack-success-channel: "#sc-app-broker"
ab-slack-failure-channel: "#sc-app-broker"
bintray-distribution-repo: spring-cloud-app-broker
bintray-package: spring-cloud-app-broker
bintray-repo: jars
bintray-subject: spring
build-name: spring-cloud-app-broker
branch: master

View File

@@ -6,4 +6,3 @@ bintray-package: spring-cloud-app-broker
bintray-repo: jars
bintray-subject: spring
build-name: spring-cloud-app-broker
branch: 1.0.x

View File

@@ -5,14 +5,14 @@ aliases:
params:
icon_emoji: ":concourse:"
username: concourse
channel: {{ab-slack-success-channel}}
channel: ((ab-slack-success-channel))
text: "$BUILD_PIPELINE_NAME pipeline has succeeded with build <https://scs.ci.springapps.io/builds/$BUILD_ID|$BUILD_NAME>!"
- &slack-failure-notification
put: alert
params:
icon_emoji: ":animal:"
icon_emoji: ":animal-1252:"
username: concourse
channel: {{ab-slack-failure-channel}}
channel: ((ab-slack-failure-channel))
text: <!here> Build <https://scs.ci.springapps.io/builds/$BUILD_ID|$BUILD_NAME> of job $BUILD_JOB_NAME in the $BUILD_PIPELINE_NAME pipeline has failed!
jobs:
@@ -28,15 +28,13 @@ jobs:
serial: true
public: true
plan:
- get: release-ci-image
- get: git-repo
trigger: true
- do:
- task: build-project
privileged: true
timeout: 1h30m
image: release-ci-image
file: git-repo/ci/tasks/build-project.yml
- task: build-project
timeout: 1h30m
file: git-repo/ci/tasks/build-project.yml
vars:
release-image-tag: ((release-image-tag))
- put: artifactory-repo
params: &artifactory-params
repo: libs-snapshot-local
@@ -59,16 +57,6 @@ jobs:
trigger: true
- task: acceptance-tests
file: git-repo/ci/tasks/acceptance-tests.yml
params:
API_HOST: {{API_HOST}}
API_PORT: {{API_PORT}}
USERNAME: {{USERNAME}}
PASSWORD: {{PASSWORD}}
CLIENT_ID: {{CLIENT_ID}}
CLIENT_SECRET: {{CLIENT_SECRET}}
DEFAULT_ORG: {{DEFAULT_ORG}}
DEFAULT_SPACE: {{DEFAULT_SPACE}}
SKIP_SSL_VALIDATION: {{SKIP_SSL_VALIDATION}}
on_success:
*slack-success-notification
on_failure:
@@ -77,15 +65,14 @@ jobs:
- name: stage-milestone
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
passed: [run-acceptance-tests]
- task: stage
image: release-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: M
vars:
release-type: M
release-image-tag: ((release-image-tag))
- put: artifactory-repo
params:
<<: *artifactory-params
@@ -97,15 +84,14 @@ jobs:
- name: stage-rc
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
passed: [run-acceptance-tests]
- task: stage
image: release-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: RC
vars:
release-type: RC
release-image-tag: ((release-image-tag))
- put: artifactory-repo
params:
<<: *artifactory-params
@@ -117,15 +103,14 @@ jobs:
- name: stage-release
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
passed: [run-acceptance-tests]
- task: stage
image: release-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: RELEASE
vars:
release-type: RELEASE
release-image-tag: ((release-image-tag))
- put: artifactory-repo
params:
<<: *artifactory-params
@@ -137,7 +122,6 @@ jobs:
- name: promote-milestone
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
@@ -146,114 +130,84 @@ jobs:
params:
save_build_info: true
- task: promote
image: release-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: M
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
vars:
release-type: M
release-image-tag: ((release-image-tag))
- name: promote-rc
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-rc]
params:
save_build_info: true
- in_parallel:
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-rc]
params:
save_build_info: true
- task: promote
image: release-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: RC
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
vars:
release-type: RC
release-image-tag: ((release-image-tag))
- name: promote-release
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-release]
params:
save_build_info: true
- in_parallel:
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-release]
params:
save_build_info: true
- task: promote
image: release-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: RELEASE
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
BINTRAY_SUBJECT: ((bintray-subject))
BINTRAY_REPO: ((bintray-repo))
BINTRAY_USERNAME: ((bintray-username))
BINTRAY_API_KEY: ((bintray-api-key))
BINTRAY_PACKAGE: ((bintray-package))
BINTRAY_DISTRIBUTION_REPO: ((bintray-distribution-repo))
vars:
release-type: RELEASE
release-image-tag: ((release-image-tag))
- name: distribute-release
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [promote-release]
params:
save_build_info: true
- in_parallel:
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [promote-release]
params:
save_build_info: true
- task: distribute
image: release-ci-image
file: git-repo/ci/tasks/distribute.yml
params:
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
BINTRAY_SUBJECT: ((bintray-subject))
BINTRAY_REPO: ((bintray-repo))
BINTRAY_USERNAME: ((bintray-username))
BINTRAY_API_KEY: ((bintray-api-key))
BINTRAY_PACKAGE: ((bintray-package))
BINTRAY_DISTRIBUTION_REPO: ((bintray-distribution-repo))
vars:
release-image-tag: ((release-image-tag))
- name: sync-to-maven-central
serial: true
plan:
- get: release-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [distribute-release]
params:
save_build_info: true
- in_parallel:
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [distribute-release]
params:
save_build_info: true
- task: sync-to-maven-central
image: release-ci-image
file: git-repo/ci/tasks/sync-to-maven-central.yml
params:
BINTRAY_USERNAME: ((bintray-username))
BINTRAY_API_KEY: ((bintray-api-key))
SONATYPE_USER_TOKEN: ((sonatype-user-token))
SONATYPE_PASSWORD_TOKEN: ((sonatype-user-token-password))
BINTRAY_SUBJECT: ((bintray-subject))
BINTRAY_REPO: ((bintray-repo))
BINTRAY_PACKAGE: ((bintray-package))
vars:
release-image-tag: ((release-image-tag))
resource_types:
- name: artifactory-resource
type: docker-image
source:
repository: springio/artifactory-resource
tag: 0.0.7
tag: 0.0.12
- name: slack-notification
type: docker-image
source:
@@ -270,6 +224,7 @@ resources:
branch: ((branch))
ignore_paths: ["ci/images/*"]
fetch_tags: true
- name: git-repo-staging
type: git
source:
@@ -277,19 +232,27 @@ resources:
username: ((github-username))
password: ((github-password))
branch: ((github-username))/staging
git_config:
- name: user.name
value: ((git-username))
- name: user.email
value: ((git-email))
- name: ci-images-git-repo
type: git
source:
uri: ((github-repo))
branch: ((branch))
paths: ["ci/images/*"]
- name: release-ci-image
type: docker-image
source:
repository: ((docker-hub-organization))/release-ci-image
username: ((docker-hub-username))
password: ((docker-hub-password))
tag: ((branch))
tag: ((release-image-tag))
- name: artifactory-repo
type: artifactory-resource
source:
@@ -297,13 +260,25 @@ resources:
username: ((artifactory-username))
password: ((artifactory-password))
build_name: ((build-name))
- name: alert
type: slack-notification
source:
url: {{scs-slack-webhook}}
url: ((scs-slack-webhook))
groups:
- name: "Main"
jobs: ["build", "run-acceptance-tests", "stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "distribute-release", "sync-to-maven-central"]
jobs:
- build
- run-acceptance-tests
- stage-milestone
- stage-rc
- stage-release
- promote-milestone
- promote-rc
- promote-release
- distribute-release
- sync-to-maven-central
- name: "CI Images"
jobs: ["build-release-ci-images"]
jobs:
- build-release-ci-images

72
ci/pr-pipeline.yml Normal file
View File

@@ -0,0 +1,72 @@
---
aliases:
- &slack-success-notification
put: alert
params:
icon_emoji: ":concourse:"
username: concourse
channel: ((ab-slack-success-channel))
text: "$BUILD_PIPELINE_NAME pipeline has succeeded with build <https://scs.ci.springapps.io/builds/$BUILD_ID|$BUILD_NAME>!"
- &slack-failure-notification
put: alert
params:
icon_emoji: ":animal-1252:"
username: concourse
channel: ((ab-slack-failure-channel))
text: <!here> Build <https://scs.ci.springapps.io/builds/$BUILD_ID|$BUILD_NAME> of job $BUILD_JOB_NAME in the $BUILD_PIPELINE_NAME pipeline has failed!
jobs:
- name: build
plan:
- get: pull-request
trigger: true
version: every
- task: build-project
timeout: 1h30m
file: pull-request/ci/tasks/build-project.yml
input_mapping:
git-repo: pull-request
vars:
release-image-tag: ((release-image-tag))
- name: run-acceptance-tests
serial: true
plan:
- get: pull-request
passed: [build]
trigger: true
- task: acceptance-tests
file: pull-request/ci/tasks/acceptance-tests.yml
input_mapping:
git-repo: pull-request
on_success:
*slack-success-notification
on_failure:
*slack-failure-notification
resource_types:
- name: pull-request
type: docker-image
source:
repository: teliaoss/github-pr-resource
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest
resources:
- name: pull-request
type: pull-request
check_every: 10s
source:
repository: ((app-broker-pr-github-pull-requests-repo))
access_token: ((app-broker-pr-github-pull-requests-access-token))
base_branch: ((branch))
- name: alert
type: slack-notification
source:
url: ((scs-slack-webhook))

View File

@@ -11,7 +11,7 @@ readonly CLIENT_SECRET="${CLIENT_SECRET:?must be set}"
readonly DEFAULT_ORG="${DEFAULT_ORG:?must be set}"
readonly DEFAULT_SPACE="${DEFAULT_SPACE:?must be set}"
readonly SKIP_SSL_VALIDATION="${SKIP_SSL_VALIDATION:?must be set}"
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:?must be set}"
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:-true}"
run_tests() {
export SPRING_CLOUD_APPBROKER_ACCEPTANCETEST_CLOUDFOUNDRY_API_HOST="${API_HOST}"
@@ -30,6 +30,9 @@ run_tests() {
}
main() {
echo "Running tests against $API_HOST"
echo
pushd "git-repo" > /dev/null
run_tests
popd > /dev/null

View File

@@ -1,15 +1,15 @@
#!/bin/bash
set -e
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:"true"}"
set -euo pipefail
# shellcheck source=scripts/common.sh
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:-true}"
# shellcheck source=common.sh
source "$(dirname "$0")/common.sh"
repository=$(pwd)/distribution-repository
pushd git-repo >/dev/null
./gradlew --no-daemon clean build install \
./gradlew --parallel clean build install \
-PonlyShowStandardStreamsOnTestFailure="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE}" \
-Dmaven.repo.local="${repository}" \
-Dorg.gradle.jvmargs="-Xmx512m -Xmx2048m"
-Dmaven.repo.local="${repository}"
popd >/dev/null

View File

@@ -1,3 +1,3 @@
source /opt/concourse-java.sh
export TERM=dumb
export TERM=xterm-256color
setup_symlinks

View File

@@ -1,37 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
readonly SCS_SECRETS_LAST_PASS_ID="1938546022346916823"
readonly SCS_ENVIRONMENT_LAST_PASS_ID="4685111791412820196"
secrets_file=$(mktemp).yml
fetch_secrets() {
lpass show --notes "${SCS_ENVIRONMENT_LAST_PASS_ID}" > "${secrets_file}"
lpass show --notes "${SCS_SECRETS_LAST_PASS_ID}" >> "${secrets_file}"
}
set_app_broker_pipeline() {
echo "Setting app-broker-1.0.x pipeline..."
fly -t scs set-pipeline -p app-broker-1.0.x -c pipeline.yml -l config-concourse-1-0-x.yml -l "${secrets_file}"
echo "Setting app-broker-1.1.x pipeline..."
fly -t scs set-pipeline -p app-broker-1.1.x -c pipeline.yml -l config-concourse-master.yml -l "${secrets_file}"
}
cleanup() {
rm "${secrets_file}"
}
trap "cleanup" EXIT
main() {
fly -t scs sync
pushd "$(dirname $0)/.." > /dev/null
fetch_secrets
set_app_broker_pipeline
popd > /dev/null
}
main

View File

@@ -9,8 +9,6 @@ git clone git-repo stage-git-repo
echo
pushd stage-git-repo >/dev/null
git config user.name "Spring Buildmaster"
git config user.email "buildmaster@springframework.org"
snapshotVersion=$(awk -F '=' '$1 == "version" { print $2 }' gradle.properties)
if [[ $RELEASE_TYPE == "M" ]]; then

View File

@@ -1,26 +1,22 @@
---
platform: linux
image_resource:
type: docker-image
source:
repository: openjdk
tag: 8
inputs:
- name: git-repo
run:
path: git-repo/ci/scripts/acceptance-tests.sh
params:
API_HOST:
API_PORT:
USERNAME:
PASSWORD:
CLIENT_ID:
CLIENT_SECRET:
DEFAULT_ORG:
DEFAULT_SPACE:
SKIP_SSL_VALIDATION:
API_HOST: ((acceptance-test-api-host))
API_PORT: ((acceptance-test-api-port))
USERNAME: ((acceptance-test-username))
PASSWORD: ((acceptance-test-password))
CLIENT_ID: ((acceptance-test-client-id))
CLIENT_SECRET: ((acceptance-test-client-secret))
DEFAULT_ORG: ((acceptance-test-default-org))
DEFAULT_SPACE: ((acceptance-test-default-space))
SKIP_SSL_VALIDATION: ((acceptance-test-skip-ssl-validation))
ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE: true

View File

@@ -1,5 +1,10 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: ((docker-hub-organization))/release-ci-image
tag: ((release-image-tag))
inputs:
- name: git-repo
outputs:
@@ -8,10 +13,6 @@ caches:
- path: maven
- path: gradle
run:
path: bash
args:
- -ec
- |
${PWD}/git-repo/ci/scripts/build-project.sh
path: git-repo/ci/scripts/build-project.sh
params:
ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE: true

View File

@@ -1,19 +1,24 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: ((docker-hub-organization))/release-ci-image
tag: ((release-image-tag))
inputs:
- name: git-repo
- name: artifactory-repo
outputs:
- name: version
params:
ARTIFACTORY_SERVER:
ARTIFACTORY_USERNAME:
ARTIFACTORY_PASSWORD:
BINTRAY_SUBJECT:
BINTRAY_REPO:
BINTRAY_USERNAME:
BINTRAY_API_KEY:
BINTRAY_PACKAGE:
BINTRAY_DISTRIBUTION_REPO:
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
BINTRAY_SUBJECT: ((bintray-subject))
BINTRAY_REPO: ((bintray-repo))
BINTRAY_USERNAME: ((bintray-username))
BINTRAY_API_KEY: ((bintray-api-key))
BINTRAY_PACKAGE: ((bintray-package))
BINTRAY_DISTRIBUTION_REPO: ((bintray-distribution-repo))
run:
path: git-repo/ci/scripts/distribute.sh

View File

@@ -1,14 +1,19 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: ((docker-hub-organization))/release-ci-image
tag: ((release-image-tag))
inputs:
- name: git-repo
- name: artifactory-repo
outputs:
- name: version
params:
RELEASE_TYPE:
ARTIFACTORY_SERVER:
ARTIFACTORY_USERNAME:
ARTIFACTORY_PASSWORD:
RELEASE_TYPE: ((release-type))
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
run:
path: git-repo/ci/scripts/promote.sh

View File

@@ -1,12 +1,17 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: ((docker-hub-organization))/release-ci-image
tag: ((release-image-tag))
inputs:
- name: git-repo
outputs:
- name: stage-git-repo
- name: distribution-repository
params:
RELEASE_TYPE:
RELEASE_TYPE: ((release-type))
caches:
- path: maven
- path: gradle

View File

@@ -1,15 +1,20 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: ((docker-hub-organization))/release-ci-image
tag: ((release-image-tag))
inputs:
- name: git-repo
- name: artifactory-repo
params:
BINTRAY_REPO:
BINTRAY_SUBJECT:
BINTRAY_USERNAME:
BINTRAY_API_KEY:
BINTRAY_PACKAGE:
SONATYPE_USER_TOKEN:
SONATYPE_PASSWORD_TOKEN:
BINTRAY_REPO: ((bintray-repo))
BINTRAY_SUBJECT: ((bintray-subject))
BINTRAY_USERNAME: ((bintray-username))
BINTRAY_API_KEY: ((bintray-api-key))
BINTRAY_PACKAGE: ((bintray-package))
SONATYPE_USER_TOKEN: ((sonatype-user-token))
SONATYPE_PASSWORD_TOKEN: ((sonatype-password-token))
run:
path: git-repo/ci/scripts/sync-to-maven-central.sh

32
scripts/set-pipelines.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail
set_pipeline() {
local pipeline_name pipeline_definition branch release_image_tag
pipeline_name="${1:?pipeline name must be provided}"
pipeline_definition="${2:?pipeline definition file must be provided}"
branch="${3:?branch must be provided}"
release_image_tag="${4:-$branch}"
echo "Setting $pipeline_name pipeline..."
fly --target app-broker set-pipeline \
--pipeline "$pipeline_name" \
--config "$pipeline_definition" \
--load-vars-from config-concourse.yml \
--var "branch=$branch" \
--var "release-image-tag=$release_image_tag"
}
main() {
fly -t app-broker sync
pushd "$(dirname "$0")/../ci" >/dev/null
set_pipeline app-broker-1.1.x pipeline.yml master
set_pipeline app-broker-1.1.x-pr pr-pipeline.yml master
popd >/dev/null
}
main

View File

@@ -46,7 +46,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.IN_PROGRESS);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
@@ -55,7 +55,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.IN_PROGRESS);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
}
@@ -69,7 +69,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.IN_PROGRESS);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
@@ -78,7 +78,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.IN_PROGRESS);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
@@ -96,7 +96,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.IN_PROGRESS);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
@@ -105,7 +105,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.IN_PROGRESS);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
@@ -116,7 +116,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.SUCCEEDED);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
@@ -125,7 +125,7 @@ class InMemoryServiceInstanceBindingStateRepositoryTest {
assertThat(serviceInstanceState.getOperationState()).isEqualTo(OperationState.SUCCEEDED);
assertThat(serviceInstanceState.getDescription()).isEqualTo("bar");
assertThat(serviceInstanceState.getLastUpdated())
.isEqualToIgnoringSeconds(Calendar.getInstance().getTime());
.isInSameMinuteWindowAs(Calendar.getInstance().getTime());
})
.verifyComplete();
}