Revert 2844 (#2980)

* Revert "review comments"

This reverts commit 97f2ecd88d.

* Revert "Switch to I, remove type parameter default"

This reverts commit a3073cc99b.

* Revert "Improve Table typing and remove annotations on callbacks"

This reverts commit defb0ea0dd.
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-07 12:02:15 -04:00
1 parent 97f2ecd88d
commit 60a19143b4
55 files changed
+471 -479

No files matched your search

@@ -22,9 +22,8 @@
import { ingressStore } from "../../components/+network-ingresses/ingress.store";
import { apiManager } from "../api-manager";
import { KubeApi } from "../kube-api";
import { KubeObject } from "../kube-object";
class TestApi extends KubeApi<KubeObject> {
class TestApi extends KubeApi {
protected async checkPreferredVersion() {
return;
@@ -37,7 +36,6 @@ describe("ApiManager", () => {
const apiBase = "apis/v1/foo";
const fallbackApiBase = "/apis/extensions/v1beta1/foo";
const kubeApi = new TestApi({
objectConstructor: KubeObject,
apiBase,
fallbackApiBases: [fallbackApiBase],
checkPreferredVersion: true,
+6 -9
View File
@@ -20,7 +20,6 @@
*/
import { KubeApi } from "../kube-api";
import { KubeObject } from "../kube-object";
describe("KubeApi", () => {
it("uses url from apiBase if apiBase contains the resource", async () => {
@@ -30,7 +29,7 @@ describe("KubeApi", () => {
body: JSON.stringify({
resources: [{
name: "ingresses"
}] as any[]
}] as any []
})
};
} else if (request.url === "/api-kube/apis/extensions/v1beta1") {
@@ -39,13 +38,13 @@ describe("KubeApi", () => {
body: JSON.stringify({
resources: [{
name: "ingresses"
}] as any[]
}] as any []
})
};
} else {
return {
body: JSON.stringify({
resources: [] as any[]
resources: [] as any []
})
};
}
@@ -54,7 +53,6 @@ describe("KubeApi", () => {
const apiBase = "/apis/networking.k8s.io/v1/ingresses";
const fallbackApiBase = "/apis/extensions/v1beta1/ingresses";
const kubeApi = new KubeApi({
objectConstructor: KubeObject,
apiBase,
fallbackApiBases: [fallbackApiBase],
checkPreferredVersion: true,
@@ -70,7 +68,7 @@ describe("KubeApi", () => {
if (request.url === "/api-kube/apis/networking.k8s.io/v1") {
return {
body: JSON.stringify({
resources: [] as any[]
resources: [] as any []
})
};
} else if (request.url === "/api-kube/apis/extensions/v1beta1") {
@@ -78,13 +76,13 @@ describe("KubeApi", () => {
body: JSON.stringify({
resources: [{
name: "ingresses"
}] as any[]
}] as any []
})
};
} else {
return {
body: JSON.stringify({
resources: [] as any[]
resources: [] as any []
})
};
}
@@ -93,7 +91,6 @@ describe("KubeApi", () => {
const apiBase = "apis/networking.k8s.io/v1/ingresses";
const fallbackApiBase = "/apis/extensions/v1beta1/ingresses";
const kubeApi = new KubeApi({
objectConstructor: KubeObject,
apiBase,
fallbackApiBases: [fallbackApiBase],
checkPreferredVersion: true,