atharvalade commented on code in PR #2822:
URL: https://github.com/apache/iggy/pull/2822#discussion_r2898777702


##########
foreign/node/src/e2e/tls.system.e2e.ts:
##########
@@ -0,0 +1,153 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// TLS integration tests for the Node.js SDK.
+//
+// These tests require a TLS-enabled Iggy server and are skipped by default.
+// To run them locally:
+//
+//   1. Start the server with TLS:
+//        IGGY_ROOT_USERNAME=iggy IGGY_ROOT_PASSWORD=iggy \
+//        IGGY_TCP_TLS_ENABLED=true \
+//        IGGY_TCP_TLS_CERT_FILE=core/certs/iggy_cert.pem \
+//        IGGY_TCP_TLS_KEY_FILE=core/certs/iggy_key.pem \
+//        cargo r --bin iggy-server
+//
+//   2. Run the tests:
+//        cd foreign/node
+//        IGGY_TCP_TLS_ENABLED=true IGGY_TCP_ADDRESS=127.0.0.1:8090 \
+//        node --import @swc-node/register/esm-register --test 
src/e2e/tls.system.e2e.ts
+
+import { readFileSync } from 'node:fs';
+import { resolve } from 'node:path';
+import { after, describe, it } from 'node:test';
+import assert from 'node:assert/strict';
+import { Client } from '../client/client.js';
+import { Partitioning, Consumer, PollingStrategy } from '../wire/index.js';
+import { getIggyAddress } from '../tcp.sm.utils.js';
+
+const tlsEnabled = process.env.IGGY_TCP_TLS_ENABLED === 'true';
+
+// Walk up from cwd to find core/certs/

Review Comment:
   replaced with `E2E_ROOT_CA_CERT` env var fallback to a relative default path



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to