Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Test annotations #110

Merged
merged 2 commits into from Jan 30, 2020

Conversation

MartinBasti
Copy link
Contributor

No description provided.

@MartinBasti
Copy link
Contributor Author

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

@@ -11,6 +11,24 @@
from tests.integration.utils import test_env, make_bundle, is_yaml_file


def _test_csv_annotations(quay_bundle, config):
Copy link
Contributor

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"]
Copy link
Contributor

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():
Copy link
Contributor

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?

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>
@MartinBasti
Copy link
Contributor Author

Updated, please check

Copy link
Contributor

@csomh csomh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@MartinBasti MartinBasti merged commit c5675e4 into release-engineering:master Jan 30, 2020
@MartinBasti MartinBasti deleted the test-annotations branch January 30, 2020 14:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants