-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19691 from guswynn/hidden-host-test
storage: test that we don't resolve remote hosts when using ssh tunnels
- Loading branch information
Showing
6 changed files
with
114 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright Materialize, Inc. and contributors. All rights reserved. | ||
# | ||
# Use of this software is governed by the Business Source License | ||
# included in the LICENSE file at the root of this repository. | ||
# | ||
# As of the Change Date specified in that file, in accordance with | ||
# the Business Source License, use of this software will be governed | ||
# by the Apache License, Version 2.0. | ||
|
||
# Test creating a source that uses Kafka/CSR via an SSH tunnel where the Kafka | ||
# broker and CSR server have hostnames that can only be resolved from the | ||
# SSH bastion host. | ||
# | ||
# The `openssh` crate previously had a bug where it would attempt to resolve | ||
# the target host on the client. | ||
# See: https://github.com/openssh-rust/openssh/pull/120 | ||
|
||
$ kafka-create-topic topic=thetopic | ||
|
||
$ kafka-ingest topic=thetopic format=bytes | ||
one | ||
|
||
> CREATE CONNECTION kafka_conn | ||
TO KAFKA (BROKER 'hidden-kafka:9092' USING SSH TUNNEL thancred); | ||
|
||
|
||
> CREATE CONNECTION csr_conn TO CONFLUENT SCHEMA REGISTRY ( | ||
URL 'http://hidden-schema-registry:8081', | ||
SSH TUNNEL thancred | ||
); | ||
|
||
$ set schema={ | ||
"type" : "record", | ||
"name" : "test", | ||
"fields" : [ | ||
{"name":"f1", "type":"string"}, | ||
{"name":"f2", "type":"long"} | ||
] | ||
} | ||
|
||
$ kafka-create-topic topic=avroavro | ||
|
||
$ kafka-ingest format=avro topic=avroavro schema=${schema} | ||
{"f1": "fish", "f2": 1000} | ||
|
||
> CREATE SOURCE csr_source | ||
FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-avroavro-${testdrive.seed}') | ||
FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn | ||
ENVELOPE NONE | ||
|
||
> SELECT * FROM csr_source | ||
f1 f2 | ||
---------- | ||
fish 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters