Skip to content

Correct tests after fabric8 upgrade#1374

Merged
ryanjbaxter merged 82 commits intospring-cloud:mainfrom
wind57:revert-tests
Jun 25, 2023
Merged

Correct tests after fabric8 upgrade#1374
ryanjbaxter merged 82 commits intospring-cloud:mainfrom
wind57:revert-tests

Conversation

@wind57
Copy link
Copy Markdown
Contributor

@wind57 wind57 commented Jun 22, 2023

No description provided.

wind57 and others added 30 commits December 4, 2021 07:59
wind57 added 13 commits May 27, 2023 00:04
configMapConfigProperties, new KubernetesNamespaceProvider(new MockEnvironment()));

assertThatThrownBy(() -> locator.locate(new MockEnvironment())).isInstanceOf(IllegalStateException.class)
.hasMessageContaining("api/v1/namespaces/default/configmaps. Message: Not Found.");
Copy link
Copy Markdown
Contributor Author

@wind57 wind57 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has caught my eye while looking at the PR that you created Ryan with fabric8 upgrade. I am not very sure what was going on and where, but "Not Found" message should have not happened, as we have a stub with "Internal Server Error" right before that, that we assert for it, on purpose.

Copy link
Copy Markdown
Contributor Author

@wind57 wind57 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the problem was in our tests all this time, but with the new upgrade they all "came to life". Most probably fabric8 tightened the internal implementation. The missing bit for me right now is how this passes locally...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah i thought they had changed the message

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I remember facing the same issue a while ago, that's why it caught my eye

@wind57 wind57 changed the title Slight correct tests after fabric8 upgrade Correct tests after fabric8 upgrade Jun 22, 2023
String path = "/api/v1/namespaces/default/configmaps";

mockServer.expect().withPath(path).andReturn(500, "Internal Server Error").once();
mockServer.expect().withPath(path).andReturn(500, "Internal Server Error").always();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho, it's a bug somewhere in fabric8 that once does not work here, for the time being always fixes it, though I might dig deeper and raise an issue in fabric8

@wind57 wind57 marked this pull request as ready for review June 24, 2023 19:57
@wind57 wind57 requested a review from ryanjbaxter June 24, 2023 19:57
@ryanjbaxter ryanjbaxter added this to the 3.1.0-M1 milestone Jun 25, 2023
@ryanjbaxter ryanjbaxter merged commit 27186ec into spring-cloud:main Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants