Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_render_build_args(git_repo):
with open('chartpress.yaml') as f:
config = yaml.load(f)
for chart in config["charts"]:
for name, options in chart["images"].items():
build_args = render_build_args(
options,
{
'LAST_COMMIT': "sha",
'TAG': "tag",
},
)
assert build_args == {
'TEST_STATIC_BUILD_ARG': 'test',
'TEST_DYNAMIC_BUILD_ARG': 'tag-sha',
}