forked from eclipse-jkube/jkube
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 for JKubeAnnotations (eclipse-jkube#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
3204f60
commit 3be8092
Showing
12 changed files
with
138 additions
and
33 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
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(false); | ||
// 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
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