Test plugins with secrets #599
Open
GitHub Actions / Production Test Results
failed
Jan 24, 2024 in 0s
344 tests run, 342 passed, 1 skipped, 1 failed.
Annotations
github-actions / Production Test Results
test_e2e_blockifier_with_secrets.test_e2e_blockifier_plugin
assert == failed. [pytest-clarity diff shown]
#x1B[0m
#x1B[0m#x1B[32mLHS#x1B[0m vs #x1B[31mRHS#x1B[0m shown below
#x1B[0m
#x1B[0m#x1B[31mFOO#x1B[0m
#x1B[0m
Raw output
def test_e2e_blockifier_plugin():
client = get_steamship_client()
blockifier_path = PLUGINS_PATH / "blockifiers" / "blockifier_with_secrets.py"
# Send up the configTemplate that would be derived from this class:
#
# class DummyBlockifierConfig(Config):
# secret: str = Field("")
#
version_config_template = {
"secret": {"type": "string", "default": ""},
}
# Deploy with the secrets TOML {secret: "FOO"}
with deploy_plugin(
client,
blockifier_path,
"blockifier",
version_config_template=version_config_template,
secrets_toml='secret="FOO"',
) as (
plugin,
version,
instance,
):
file = File.create(client=client, content="This is a test.")
assert len(file.refresh().blocks) == 0
file.blockify(plugin_instance=instance.handle).wait()
file.refresh()
assert len(file.blocks) == 1
> assert file.blocks[0].text == "FOO"
E assert == failed. [pytest-clarity diff shown]
E #x1B[0m
E #x1B[0m#x1B[32mLHS#x1B[0m vs #x1B[31mRHS#x1B[0m shown below
E #x1B[0m
E #x1B[0m#x1B[31mFOO#x1B[0m
E #x1B[0m
tests/steamship_tests/plugin/integration/test_e2e_blockifier_with_secrets.py:38: AssertionError
Loading