-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding support for extensions objects as defined by minikube
- Loading branch information
Showing
4 changed files
with
93 additions
and
4 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
30 changes: 30 additions & 0 deletions
30
KubeContextTests/KubeContextLoadMiniKubeContextTests.swift
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,30 @@ | ||
// | ||
// KubeContextMiniKube.swift | ||
// KubeContextTests | ||
// | ||
// Created by Andy Steinmann on 9/4/21. | ||
// Copyright © 2021 Turken, Hasan. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
@testable import KubeContext | ||
|
||
class KubeContextLoadMiniKubeContextTests: XCTestCase { | ||
var k8s: Kubernetes? | ||
var bundle: Bundle! | ||
|
||
override func setUp() { | ||
bundle = Bundle(for: type(of: self)) | ||
k8s = Kubernetes() | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
override func tearDown() { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
func testLoadMiniKubeFile() { | ||
let url = bundle.url(forResource: "minikube", withExtension: "yaml", subdirectory: "TestData") | ||
XCTAssertNoThrow(try k8s?.setKubeconfig(configFile: url)); | ||
} | ||
} |
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,33 @@ | ||
|
||
apiVersion: v1 | ||
clusters: | ||
- cluster: | ||
certificate-authority: /Users/user/.minikube/ca.crt | ||
extensions: | ||
- extension: | ||
last-update: Sat, 04 Sep 2021 10:04:54 CDT | ||
provider: minikube.sigs.k8s.io | ||
version: v1.23.0 | ||
name: cluster_info | ||
server: https://1.2.3.4:5678 | ||
name: minikube | ||
contexts: | ||
- context: | ||
cluster: minikube | ||
extensions: | ||
- extension: | ||
last-update: Sat, 04 Sep 2021 10:04:54 CDT | ||
provider: minikube.sigs.k8s.io | ||
version: v1.23.0 | ||
name: context_info | ||
namespace: default | ||
user: minikube | ||
name: minikube | ||
current-context: minikube | ||
kind: Config | ||
preferences: {} | ||
users: | ||
- name: minikube | ||
user: | ||
client-certificate: /Users/user/.minikube/profiles/minikube/client.crt | ||
client-key: /Users/user/.minikube/profiles/minikube/client.key |