Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
eob committed Jan 24, 2024
1 parent 6c735b5 commit 865c30f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/assets/plugins/blockifiers/blockifier_with_secrets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from typing import Optional, Type
from typing import Type

from pydantic import Field

from steamship import Block, File
from steamship.invocable import Config, InvocableResponse, create_handler
Expand All @@ -20,7 +22,7 @@

class DummyBlockifierPlugin(Blockifier):
class DummyBlockifierConfig(Config):
secret: Optional[str] = ""
secret: str = Field("")

config: DummyBlockifierConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@
def test_e2e_blockifier_plugin():
client = get_steamship_client()
blockifier_path = PLUGINS_PATH / "blockifiers" / "blockifier_with_secrets.py"
with deploy_plugin(client, blockifier_path, "blockifier", secrets_toml='secret="FOO"') as (

# 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,
Expand Down

0 comments on commit 865c30f

Please sign in to comment.