Skip to content

Commit

Permalink
Add project reference when getting plugin information (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
omkhegde authored Jan 27, 2021
1 parent 10ffae6 commit 370cb55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rpdk/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def submit(
cli_metadata = {}

try:
cli_metadata = self._plugin.get_plugin_information()
cli_metadata = self._plugin.get_plugin_information(self)
except AttributeError:
LOG.debug(
"Version info is not available for plugins, not writing to metadata file"
Expand Down
7 changes: 6 additions & 1 deletion tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@
UPDATE_INPUTS_FILE = "inputs/inputs_1_update.json"
INVALID_INPUTS_FILE = "inputs/inputs_1_invalid.json"

PLUGIN_INFORMATION = {"plugin-version": "2.1.3", "plugin-name": "java"}
PLUGIN_INFORMATION = {
"plugin-version": "2.1.3",
"plugin-tool-version": "2.0.8",
"plugin-name": "java",
}


@pytest.mark.parametrize("string", ["^[a-z]$", "([a-z])", ".*", "*."])
Expand Down Expand Up @@ -801,6 +805,7 @@ def test_submit_dry_run(project):
metadata_info = json.loads(zip_file.read(CFN_METADATA_FILENAME).decode("utf-8"))
assert "cli-version" in metadata_info
assert "plugin-version" in metadata_info
assert "plugin-tool-version" in metadata_info


def test_submit_dry_run_modules(project):
Expand Down

0 comments on commit 370cb55

Please sign in to comment.