File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
integration-test/src/test/java/org/cloudfoundry Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1818
1919import java .time .Duration ;
2020import org .cloudfoundry .AbstractIntegrationTest ;
21+ import org .cloudfoundry .ApplicationUtils ;
2122import org .cloudfoundry .CloudFoundryVersion ;
2223import org .cloudfoundry .IfCloudFoundryVersion ;
2324import org .cloudfoundry .client .CloudFoundryClient ;
2425import org .cloudfoundry .client .v3 .admin .ClearBuildpackCacheRequest ;
2526import org .cloudfoundry .util .JobUtils ;
2627import org .junit .jupiter .api .Test ;
2728import org .springframework .beans .factory .annotation .Autowired ;
29+
30+ import reactor .core .publisher .Mono ;
2831import reactor .test .StepVerifier ;
2932
3033public final class AdminTest extends AbstractIntegrationTest {
3134
3235 @ Autowired private CloudFoundryClient cloudFoundryClient ;
3336
37+ // The buildpacks cache needs to be non-empty for the DELETE call to succeed.
38+ // We pull the "testLogCacheApp" bean, which ensures the bean will be initialized,
39+ // the app will be pushed, and it will add some data to the cache.
40+ @ Autowired private Mono <ApplicationUtils .ApplicationMetadata > testLogCacheApp ;
41+
3442 @ IfCloudFoundryVersion (greaterThanOrEqualTo = CloudFoundryVersion .PCF_2_10 )
3543 @ Test
3644 public void clearBuildpackCache () {
Original file line number Diff line number Diff line change 8787import org .cloudfoundry .util .FluentMap ;
8888import org .junit .jupiter .api .Test ;
8989import org .springframework .beans .factory .annotation .Autowired ;
90+ import org .springframework .beans .factory .annotation .Qualifier ;
9091import org .springframework .core .io .ClassPathResource ;
9192import reactor .core .publisher .Flux ;
9293import reactor .core .publisher .Mono ;
@@ -106,6 +107,10 @@ public final class ApplicationsTest extends AbstractIntegrationTest {
106107
107108 @ Autowired private LogCacheClient logCacheClient ;
108109
110+ // To create a service in #pushBindService, the Service Broker must be installed first.
111+ // We ensure it is by loading the serviceBrokerId @Lazy bean.
112+ @ Qualifier ("serviceBrokerId" ) @ Autowired private Mono <String > serviceBrokerId ;
113+
109114 @ Test
110115 public void copySource () throws IOException {
111116 String sourceName = this .nameFactory .getApplicationName ();
Original file line number Diff line number Diff line change 3333import org .cloudfoundry .util .ResourceUtils ;
3434import org .junit .jupiter .api .Test ;
3535import org .springframework .beans .factory .annotation .Autowired ;
36+ import org .springframework .beans .factory .annotation .Qualifier ;
37+
3638import reactor .core .publisher .Flux ;
3739import reactor .core .publisher .Mono ;
3840import reactor .test .StepVerifier ;
@@ -53,6 +55,10 @@ public final class ServiceAdminTest extends AbstractIntegrationTest {
5355
5456 @ Autowired private String serviceName ;
5557
58+ // To create a service in #pushBindService, the Service Broker must be installed first.
59+ // We ensure it is by loading the serviceBrokerId @Lazy bean.
60+ @ Qualifier ("serviceBrokerId" ) @ Autowired private Mono <String > serviceBrokerId ;
61+
5662 @ Test
5763 public void disableServiceAccess () {
5864 String planName = this .nameFactory .getPlanName ();
You can’t perform that action at this time.
0 commit comments