Skip to content

Go SDK: Add TCP/TLS integration tests and examples #2807

@mmodzelewski

Description

@mmodzelewski

Summary

The Go SDK has TCP/TLS support implemented in foreign/go/client/tcp/tcp_core.go with configurable TLS options, but there are no integration tests for TLS connections and no TLS examples in examples/go/.

Current State

  • TLS implementation: Present in tcp_core.go with config options:
    • tlsEnabled - Enable/disable TLS
    • tlsDomain - Domain for TLS (auto-extracts from address if not set)
    • tlsCAFile - Path to CA certificate file
    • tlsValidateCertificate - Toggle certificate validation (default: true)
  • Integration tests: No TLS-specific integration tests exist (existing tests in foreign/go/ only cover serialization and benchmarks)
  • Examples: No TLS-specific examples in examples/go/ (only basic consumer/producer examples exist)

Requirements

Integration Tests

  • Add integration test(s) that start an Iggy server with TLS enabled and connect using the Go TCP client with TLS
  • Use custom certificates from core/certs/ (iggy_ca_cert.pem, iggy_cert.pem, iggy_key.pem)
  • Test scenarios:
    • Successful TLS connection with custom CA certificate
    • Connection failure when TLS is required but client doesn't use TLS
    • Basic message send/receive over TLS connection

Examples

  • Add a TLS example in examples/go/ demonstrating:
    • How to configure the TCP client with TLS enabled
    • How to specify a custom CA certificate file
    • A simple producer/consumer flow over TLS

Reference

  • Server TLS config env vars: IGGY_TCP_TLS_ENABLED=true, IGGY_TCP_TLS_CERT_FILE, IGGY_TCP_TLS_KEY_FILE
  • Custom certs location: core/certs/
  • C# TLS tests for reference: foreign/csharp/Iggy_SDK.Tests.Integration/IggyTlsConnectionTests.cs

Metadata

Metadata

Assignees

Labels

goPull requests that update go codegood first issueGood for newcomerssdkChange related to sdk (client) APItestNew testcase, or improvement of existing

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions