Skip to content

Test plugins with secrets #1996

Test plugins with secrets

Test plugins with secrets #1996

GitHub Actions / Staging Test Results failed Jan 24, 2024 in 0s

344 tests run, 342 passed, 1 skipped, 1 failed.

Annotations

Check failure on line 38 in tests/steamship_tests/plugin/integration/test_e2e_blockifier_with_secrets.py

See this annotation in the file changed.

@github-actions github-actions / Staging 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