-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kube-api-test): use binaries from GitHub releases (6281)
improve: use new GitHub based binary repo for KubeAPITest Signed-off-by: Attila Mészáros <[email protected]> --- wip Signed-off-by: Attila Mészáros <[email protected]> --- cleanup Signed-off-by: Attila Mészáros <[email protected]> --- add missing license Signed-off-by: Attila Mészáros <[email protected]> --- naming Signed-off-by: Attila Mészáros <[email protected]> --- changelog update Signed-off-by: Attila Mészáros <[email protected]> --- test update Signed-off-by: Attila Mészáros <[email protected]> --- sonar fixes Signed-off-by: Attila Mészáros <[email protected]>
- Loading branch information
Showing
9 changed files
with
143 additions
and
72 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
41 changes: 41 additions & 0 deletions
41
...ube-api-test/core/src/main/java/io/fabric8/kubeapitest/binary/repo/ArchiveDescriptor.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,41 @@ | ||
/* | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubeapitest.binary.repo; | ||
|
||
public class ArchiveDescriptor { | ||
|
||
private final String version; | ||
private final String arch; | ||
private final String os; | ||
|
||
public ArchiveDescriptor(String version, String arch, String os) { | ||
this.version = version; | ||
this.arch = arch; | ||
this.os = os; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
public String getArch() { | ||
return arch; | ||
} | ||
|
||
public String getOs() { | ||
return os; | ||
} | ||
} |
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
35 changes: 35 additions & 0 deletions
35
...t/kube-api-test/core/src/test/java/io/fabric8/kubeapitest/binary/repo/BinaryRepoTest.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,35 @@ | ||
/* | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubeapitest.binary.repo; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class BinaryRepoTest { | ||
|
||
@Test | ||
void parsesSelfLinkToArchiveDescriptor() { | ||
var archiveDescriptor = BinaryRepo | ||
.mapSelfLinkToArchiveDescriptor( | ||
"https://github.com/kubernetes-sigs/controller-tools/releases/download/envtest-v1.28.0/envtest-v1.28.0-linux-arm64.tar.gz"); | ||
|
||
assertThat(archiveDescriptor.getOs()).isEqualTo("linux"); | ||
assertThat(archiveDescriptor.getArch()).isEqualTo("arm64"); | ||
assertThat(archiveDescriptor.getVersion()).isEqualTo("1.28.0"); | ||
} | ||
|
||
} |