Skip to content
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

Add nats-server wrapper for tests #7

Merged
merged 3 commits into from
Dec 1, 2023
Merged

Add nats-server wrapper for tests #7

merged 3 commits into from
Dec 1, 2023

Conversation

piotrpio
Copy link
Contributor

No description provided.

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio requested a review from Jarema November 30, 2023 15:44
Tests/NatsSwiftTests/NatsServer.swift Show resolved Hide resolved
var port: UInt? { return natsServerPort }
var clientURL: String {
if let natsServerPort {
return "nats://localhost:\(natsServerPort)"
Copy link
Member

Choose a reason for hiding this comment

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

We should also allow for tls, like we don in rust wrapper:

        let mut scheme = "nats://";
        if si["tls_required"].as_bool().unwrap_or(false) {
            scheme = "tls://";
        }
        format!("{scheme}localhost:{port}")

Tests/NatsSwiftTests/NatsServer.swift Show resolved Hide resolved
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio requested a review from Jarema December 1, 2023 10:43
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM!

@Jarema Jarema merged commit c54414c into main Dec 1, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants