-
Notifications
You must be signed in to change notification settings - Fork 321
Minor fixes to some integration tests. fixes #1363 #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Lokowandtg
wants to merge
5
commits into
cloudfoundry:5.x.x
Choose a base branch
from
Lokowandtg:5.x.x_v2InfoEndpoint
base: 5.x.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
62cd451
Minor fixes to some integration tests.
Lokowandtg 2d87c86
Fix ApplicationsTest.pushNewDocker
Lokowandtg 1c0bac8
fix an other integration test
Lokowandtg f85f251
enable and fix v3.PackagesTest
Lokowandtg c041f43
replace hard coded apihost with value from environment
Lokowandtg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
| import java.time.Instant; | ||
| import java.util.Collections; | ||
| import java.util.Date; | ||
| import java.util.List; | ||
| import java.util.function.Function; | ||
| import java.util.function.UnaryOperator; | ||
| import org.cloudfoundry.AbstractIntegrationTest; | ||
|
|
@@ -109,7 +110,6 @@ | |
| import org.cloudfoundry.util.JobUtils; | ||
| import org.cloudfoundry.util.PaginationUtils; | ||
| import org.cloudfoundry.util.ResourceUtils; | ||
| import org.junit.jupiter.api.Disabled; | ||
| import org.junit.jupiter.api.Test; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import reactor.core.publisher.Flux; | ||
|
|
@@ -1885,13 +1885,9 @@ public void listServicesFilterByLabel() { | |
| .verify(Duration.ofMinutes(5)); | ||
| } | ||
|
|
||
| // TODO: Await https://github.com/cloudfoundry/cloud_controller_ng/issues/856 for this test to | ||
| // work | ||
| @Disabled( | ||
| "Await https://github.com/cloudfoundry/cloud_controller_ng/issues/856 for this test to" | ||
| + " work") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome! |
||
| @Test | ||
| public void listServicesFilterByServiceBrokerId() { | ||
| List<String> expectedValues = List.of(this.serviceName, this.serviceName + "-shareable"); | ||
| Mono.zip(this.serviceBrokerId, this.spaceId) | ||
| .flatMapMany( | ||
| function( | ||
|
|
@@ -1903,9 +1899,10 @@ public void listServicesFilterByServiceBrokerId() { | |
| builder.serviceBrokerId(serviceBrokerId)))) | ||
| .map(response -> response.getEntity().getLabel()) | ||
| .as(StepVerifier::create) | ||
| .expectNext(this.serviceName) | ||
| .consumeNextWith(element -> assertThat(element).isIn(expectedValues)) | ||
| .consumeNextWith(element -> assertThat(element).isIn(expectedValues)) | ||
| .expectComplete() | ||
| .verify(Duration.ofMinutes(5)); | ||
| .verify(Duration.ofMinutes(10)); | ||
| } | ||
|
|
||
| @Test | ||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -30,17 +30,16 @@ | |
| import org.cloudfoundry.client.v3.packages.CreatePackageRequest; | ||
| import org.cloudfoundry.client.v3.packages.GetPackageRequest; | ||
| import org.cloudfoundry.client.v3.packages.Package; | ||
| import org.cloudfoundry.client.v3.packages.PackageRelationships; | ||
| import org.cloudfoundry.client.v3.packages.PackageType; | ||
| import org.cloudfoundry.client.v3.packages.UploadPackageRequest; | ||
| import org.junit.jupiter.api.Disabled; | ||
| import org.junit.jupiter.api.Test; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.core.io.ClassPathResource; | ||
| import reactor.core.Exceptions; | ||
| import reactor.core.publisher.Mono; | ||
| import reactor.test.StepVerifier; | ||
|
|
||
| @Disabled("Until Packages are no longer experimental") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very nice! |
||
| public final class PackagesTest extends AbstractIntegrationTest { | ||
|
|
||
| @Autowired private CloudFoundryClient cloudFoundryClient; | ||
|
|
@@ -81,6 +80,19 @@ public void upload() { | |
| .create( | ||
| CreatePackageRequest.builder() | ||
| .type(PackageType.BITS) | ||
| .relationships( | ||
| PackageRelationships.builder() | ||
| .application( | ||
| ToOneRelationship | ||
| .builder() | ||
| .data( | ||
| Relationship | ||
| .builder() | ||
| .id( | ||
| applicationId) | ||
| .build()) | ||
| .build()) | ||
| .build()) | ||
| .build())) | ||
| .map(Package::getId) | ||
| .flatMap( | ||
|
|
||
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is annotated with
@RequiresV2Api. Have you tried theSKIP_V2_TESTSenv var? Does it not work as intended?I'm surprised other test annotated with
@RequiresV2Apipassed at all.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the tests pass when v2 is disabled completely. So far v2 is fully functional, but the urls are checked and v2 is refused. This refusal code is disabled locally :-)
Current plan is to remove v2 starting 2027, by then we must be done with the migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU the whole
org.cloudfoundry.client.v2package requires CAPI v2 API.Yes, it should be skipped when setting
SKIP_V2_TESTSto true.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SKIP_V2_TESTS works as intended, but I ususally set it to "false" and run all tests.