Skip to content

Commit

Permalink
rptest: remove rpk config init
Browse files Browse the repository at this point in the history
This was previously unofficially deprecated, and is now officially
deprecated. The command exists but is hidden and exits with 0
immediately; previously it wrote a default redpanda.yaml and did nothing
else.
  • Loading branch information
twmb committed May 9, 2023
1 parent 07c27b0 commit b7ec576
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
4 changes: 0 additions & 4 deletions tests/rptest/clients/rpk_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ def __init__(self, redpanda, node):
self._redpanda = redpanda
self._node = node

def config_init(self, path=None, timeout=30):
cmd = ['init']
return self._run_config(cmd, path, timeout)

def config_set(self, key, value, format=None, path=None, timeout=30):
cmd = [
'set',
Expand Down
44 changes: 0 additions & 44 deletions tests/rptest/tests/rpk_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,6 @@ def __init__(self, ctx):
super(RpkConfigTest, self).__init__(test_context=ctx)
self._ctx = ctx

@cluster(num_nodes=3)
def test_config_init(self):
n = random.randint(0, len(self.redpanda.nodes))
node = self.redpanda.get_node(n)
rpk = RpkRemoteTool(self.redpanda, node)
path = './redpanda-test.yaml'

rpk.config_init(path)

with tempfile.TemporaryDirectory() as d:
node.account.copy_from(path, d)
with open(os.path.join(d, path)) as f:
expected_out = '''
pandaproxy: {}
redpanda:
data_directory: /var/lib/redpanda/data
seed_servers: []
rpc_server:
address: 0.0.0.0
port: 33145
kafka_api:
- address: 0.0.0.0
port: 9092
admin:
- address: 0.0.0.0
port: 9644
developer_mode: true
rpk:
coredump_dir: /var/lib/redpanda/coredump
overprovisioned: true
schema_registry: {}
'''

expected_config = yaml.full_load(expected_out)
actual_config = yaml.full_load(f.read())

if actual_config != expected_config:
self.logger.error("Configs differ")
self.logger.error(
f"Expected: {yaml.dump(expected_config)}")
self.logger.error(f"Actual: {yaml.dump(actual_config)}")

assert actual_config == expected_config

@cluster(num_nodes=3)
def test_config_set_single_number(self):
n = random.randint(1, len(self.redpanda.nodes))
Expand Down

0 comments on commit b7ec576

Please sign in to comment.