Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KubernetesAttributesExtractor is not testing anything #977

Merged
merged 7 commits into from
Jan 10, 2018

Conversation

carlossg
Copy link
Contributor

@carlossg carlossg commented Jan 8, 2018

KubernetesAttributesExtractor bugs:

expected.add does not modify object
Parse correctly urls without namespace
Parse ingresses correctly
Add some logging to mock server

@iocanel iocanel self-requested a review January 10, 2018 08:16
Copy link
Member

@iocanel iocanel left a comment

Choose a reason for hiding this comment

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

LGTM

There is a test failure, that seems to be unrelated to this PR (will rerun tests and merge once it passes).


protected static final Pattern NAMESPACED_CREATE_PATH = Pattern.compile("/api[s]?/" + VERSION_GROUP + "/namespaces/" + NAMESPACE_GROUP + "/" + KIND_GROUP + "[^ ]*");
protected static final Pattern NON_NAMESPACED_CREATE_PATH = Pattern.compile("/api[s]?/" + "/" + KIND_GROUP + "[^ ]*");
protected static final Pattern PATTERN = Pattern.compile(API_GROUP + VERSION_GROUP + NAMESPACE_GROUP + KIND_GROUP + NAME_GROUP + END_GROUP);
Copy link
Member

Choose a reason for hiding this comment

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

+1

@@ -150,7 +126,9 @@ private static AttributeSet extract(Matcher m) {
if (!Strings.isNullOrEmpty(kind)) {

//Poor mans to singular.
if (kind.endsWith("s")) {
if (kind.endsWith("ses")) {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

But for now this will do.

@iocanel
Copy link
Member

iocanel commented Jan 10, 2018

[merge]

@fusesource-ci fusesource-ci merged commit 78b7d24 into fabric8io:master Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants