Minor fixes to some integration tests. fixes #1363#1364
Conversation
InfoTest fails if running against a CF where v2 API is disabled. OrganizationsTest fails when running in kind-deployment landscape. The package "serviceInstances" (with capital "I") does not match the package declaration in the contained class. This creates problems in Eclipse on Windows.
The old docker image was outdated and did not work on recent docker versions. Switching to the image of a better supported test application.
And update documentation in TokensTest.
Kehrlann
left a comment
There was a problem hiding this comment.
Hey @Lokowandtg
Thanks for your contribution. Surprised that some tests (all the .client.v2 and .operations tests) pass without V2, are you using SKIP_V2_TESTS ? And if so, shouldn't InfoTest be skipped?
| // work | ||
| @Disabled( | ||
| "Await https://github.com/cloudfoundry/cloud_controller_ng/issues/856 for this test to" | ||
| + " work") |
| assertThat(name) | ||
| .satisfiesAnyOf( | ||
| nameParam -> | ||
| assertThat(nameParam) | ||
| .contains( | ||
| "apps.", | ||
| ".shepherd.tanzu.broadcom.net"), | ||
| nameParam -> | ||
| assertThat(nameParam) | ||
| .contains( | ||
| "apps.", | ||
| ".127-0-0-1.nip.io")); // when | ||
| // testing with kind-deploy. |
There was a problem hiding this comment.
Suggestion: Can we infer the domain from the TEST_APIHOST env var?
(Not a hard requirement but it'd be nicer than hardcoding deployment options)
There was a problem hiding this comment.
That's a good point. Will do.
| import reactor.core.publisher.Mono; | ||
| import reactor.test.StepVerifier; | ||
|
|
||
| @Disabled("Until Packages are no longer experimental") |
| Version actual; | ||
| String version = response.getApiVersion(); | ||
| if (version == null || version.isEmpty()) { | ||
| assertThat("CF API v2 is disabled") | ||
| .isEqualTo(response.getSupport()); | ||
| actual = Version.of(0, 0, 0); | ||
| } else { | ||
| actual = Version.valueOf(version); | ||
| } | ||
| assertThat(actual).isLessThanOrEqualTo(expected); |
There was a problem hiding this comment.
This file is annotated with @RequiresV2Api. Have you tried the SKIP_V2_TESTS env var? Does it not work as intended?
I'm surprised other test annotated with @RequiresV2Api passed at all.
There was a problem hiding this comment.
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.
AFAIU the whole org.cloudfoundry.client.v2 package requires CAPI v2 API.
Yes, it should be skipped when setting SKIP_V2_TESTS to true.
There was a problem hiding this comment.
SKIP_V2_TESTS works as intended, but I ususally set it to "false" and run all tests.
InfoTest fails if running against a CF where v2 API is disabled.
OrganizationsTest.getDefaultDomain fails when running in kind-deployment landscape.
The package "serviceInstances" (with capital "I") does not match the package declaration in the contained class. This creates problems in Eclipse on Windows.