-
Notifications
You must be signed in to change notification settings - Fork 94
List services gateway #321
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
List services gateway #321
Conversation
|
Hello greetings! ☀️ |
Hi, I'm unsure, but perhaps there's no need to create a separate TerminatingGatewayConfigEntry. It might be possible to utilize the AgentService struct and assign the relevant ServiceKind value accordingly. For our testing purposes, registering any ingress and terminating gateway and then querying it should suffice. |
OH great, would it look something like this? |
|
I guess it might work, worth giving it a try. |
…b.com/JocelynVelarde/consuldotnet into G-Research#315-list-services-gateaway
…inating and ingress service kind
|
@marcin-krystianc I believe it is working now!
|
| var ingressGatewayServices = await client.Catalog.GatewayService("ingress-gateway", QueryOptions.Default, CancellationToken.None); | ||
| Assert.NotEmpty(ingressGatewayServices.Response); | ||
| // Assert that the response is not null | ||
| Assert.NotNull(gatewayServices); |
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.
I think, it "works" because we don't actually check whether there are any services returned, it should be Assert.NotEmpty(gatewayServices.Response) 🐞
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.
Alright let me check. 🫡
|
@marcin-krystianc Hi, Marcin! I have picked up this issue for now and I just wanted to check up with you on what the state of the issue last was. I have been trying the code and for now it seems to me that during the test the gateaways fail to register completely or fail to register in time for when we check them. That is because when I run the tests the Catalog.Register requests return OK as well as /catalog/gateaway-services/..., however, the GateawayServices Response is Empty. |
Yeah, as far I remember we couldn't figure out why the test procedure fails. It seems the registration is successful, i.e. the request returns Ok and in the Web UI (http://localhost:8500/) we could see it. But still the response is empty and the test fails. |
Hmm, makes sense. How would we go about reaching out to the community? And I am not really sure if I understand the last part corrently. Do you mean trying to work out what we have different from the tests in the Golang client? |
Regarding the community: I think Jocelyn already started a conversation in the consul project https://discuss.hashicorp.com/t/null-response-when-making-get-request-to-list-services-associated-with-a-gateway/67115/3. Regarding the go tests, I mean that we can compare our tests with go client's tests and look for differences. |
|
Replaced with #347 |
Changes made
Catalog.csICatalogEndpoint.csCatalogTest.cs(currently as a comment)Issue ticket number and link