Skip to content

Commit 865c30f

Browse files
committed
WIP
1 parent 6c735b5 commit 865c30f

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

tests/assets/plugins/blockifiers/blockifier_with_secrets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from typing import Optional, Type
1+
from typing import Type
2+
3+
from pydantic import Field
24

35
from steamship import Block, File
46
from steamship.invocable import Config, InvocableResponse, create_handler
@@ -20,7 +22,7 @@
2022

2123
class DummyBlockifierPlugin(Blockifier):
2224
class DummyBlockifierConfig(Config):
23-
secret: Optional[str] = ""
25+
secret: str = Field("")
2426

2527
config: DummyBlockifierConfig
2628

tests/steamship_tests/plugin/integration/test_e2e_blockifier_with_secrets.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,24 @@
88
def test_e2e_blockifier_plugin():
99
client = get_steamship_client()
1010
blockifier_path = PLUGINS_PATH / "blockifiers" / "blockifier_with_secrets.py"
11-
with deploy_plugin(client, blockifier_path, "blockifier", secrets_toml='secret="FOO"') as (
11+
12+
# Send up the configTemplate that would be derived from this class:
13+
#
14+
# class DummyBlockifierConfig(Config):
15+
# secret: str = Field("")
16+
#
17+
version_config_template = {
18+
"secret": {"type": "string", "default": ""},
19+
}
20+
21+
# Deploy with the secrets TOML {secret: "FOO"}
22+
with deploy_plugin(
23+
client,
24+
blockifier_path,
25+
"blockifier",
26+
version_config_template=version_config_template,
27+
secrets_toml='secret="FOO"',
28+
) as (
1229
plugin,
1330
version,
1431
instance,

0 commit comments

Comments
 (0)