Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor (jkube-kit/config/resource) : Deprecate
jkube.io
annotatio…
…n prefix in favor of `jkube.eclipse.org` for JKubeAnnotations (#1273) + Deprecate `jkube.io` annotation prefix in favor of `jkube.eclipse.org` + Add `jkube.useOldJKubePrefix` flag to switch to `jkube.io` annotation prefix in case any user is interested in this. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
- Loading branch information
1 parent
8db1fe1
commit ba95fb2
Showing
15 changed files
with
154 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ig/resource/src/test/java/org/eclipse/jkube/kit/config/resource/JKubeAnnotationsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Copyright (c) 2019 Red Hat, Inc. | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at: | ||
* | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
package org.eclipse.jkube.kit.config.resource; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class JKubeAnnotationsTest { | ||
@Test | ||
void value_withUseDeprecatedPrefixFalse_shouldReturnJKubeEclipseOrgPrefix() { | ||
// Given + When | ||
String result = JKubeAnnotations.GIT_COMMIT.value(); | ||
// Then | ||
assertThat(result).isEqualTo("jkube.eclipse.org/git-commit"); | ||
} | ||
|
||
@Test | ||
void value_withUseDeprecatedPrefixTrue_shouldReturnJKubeIoPrefix() { | ||
// Given + When | ||
String result = JKubeAnnotations.GIT_COMMIT.value(true); | ||
// Then | ||
assertThat(result).isEqualTo("jkube.io/git-commit"); | ||
} | ||
|
||
@Test | ||
void toString_whenInvoked_shouldUseJkubeEclipseOrgPrefix() { | ||
// Given + When | ||
String result = JKubeAnnotations.GIT_BRANCH.toString(); | ||
// Then | ||
assertThat(result).isEqualTo("jkube.eclipse.org/git-branch"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,3 +192,4 @@ public void visit(ServiceBuilder service) { | |
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,3 +236,4 @@ private void assertPodTemplateSpecContainsInitContainerAndVolumeMounts(Kubernete | |
} | ||
} | ||
|
||
|
Oops, something went wrong.