Test annotations #110
Test annotations #110
Conversation
I reused existing test, to test if package_name replacement correctly uses suffix. I'm not sure if it's worth to create a separate namespace and separate test |
79b20d8
to
275bad1
Compare
@@ -11,6 +11,24 @@ | |||
from tests.integration.utils import test_env, make_bundle, is_yaml_file | |||
|
|||
|
|||
def _test_csv_annotations(quay_bundle, config): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about calling this "check_csv_annotations"? As this is what it really does.
I would call something a "test" if has some object under test and pokes that object in order to check how the object reacts to that. Not sure if this makes sens 🤔
Package name must contain suffix. | ||
""" | ||
|
||
package_name = config["package"] + config["suffix"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say that it's out of scope of this function to check that the package name is correct.
Just use quay_bundle["packageName"]
.
If this is done, the function signature could be changed to:
def check_csv_annotations(quay_bundle, expected_annotations):
Which maybe would be a little bit nicer.
'package_name': package_name, | ||
} | ||
|
||
for name, value in config['csv_annotations'].items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe double quotes for consistency?
275bad1
to
f64b34e
Compare
Test if csv_annotations are properly added to CSV metadata (including package name with suffix) Signed-off-by: Martin Bašti <mbasti@redhat.com>
Different namespace must use different oath token Signed-off-by: Martin Bašti <mbasti@redhat.com>
f64b34e
to
d0573f9
Compare
Updated, please check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
No description provided.