mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
2f2b98eeff
commit
7cab68b403
@ -736,7 +736,7 @@ describe("KubeApi", () => {
|
|||||||
|
|
||||||
it("requests version list from the api group from the initial apiBase", () => {
|
it("requests version list from the api group from the initial apiBase", () => {
|
||||||
expect(fetchMock.mock.lastCall).toMatchObject([
|
expect(fetchMock.mock.lastCall).toMatchObject([
|
||||||
"http://127.0.0.1:9999/api-kube/apis/autoscaling",
|
"https://127.0.0.1:12345/api-kube/apis/autoscaling",
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
@ -749,8 +749,8 @@ describe("KubeApi", () => {
|
|||||||
describe("when the version list from the api group resolves with preferredVersion in allowed version", () => {
|
describe("when the version list from the api group resolves with preferredVersion in allowed version", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await fetchMock.resolveSpecific(
|
await fetchMock.resolveSpecific(
|
||||||
["http://127.0.0.1:9999/api-kube/apis/autoscaling"],
|
["https://127.0.0.1:12345/api-kube/apis/autoscaling"],
|
||||||
createMockResponseFromString("http://127.0.0.1:9999/api-kube/apis/autoscaling", JSON.stringify({
|
createMockResponseFromString("https://127.0.0.1:12345/api-kube/apis/autoscaling", JSON.stringify({
|
||||||
apiVersion: "v1",
|
apiVersion: "v1",
|
||||||
kind: "APIGroup",
|
kind: "APIGroup",
|
||||||
name: "autoscaling",
|
name: "autoscaling",
|
||||||
@ -774,7 +774,7 @@ describe("KubeApi", () => {
|
|||||||
|
|
||||||
it("requests resources from the preferred version api group from the initial apiBase", () => {
|
it("requests resources from the preferred version api group from the initial apiBase", () => {
|
||||||
expect(fetchMock.mock.lastCall).toMatchObject([
|
expect(fetchMock.mock.lastCall).toMatchObject([
|
||||||
"http://127.0.0.1:9999/api-kube/apis/autoscaling/v1",
|
"https://127.0.0.1:12345/api-kube/apis/autoscaling/v1",
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
@ -788,8 +788,8 @@ describe("KubeApi", () => {
|
|||||||
describe("when the version list from the api group resolves with preferredVersion not allowed version", () => {
|
describe("when the version list from the api group resolves with preferredVersion not allowed version", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await fetchMock.resolveSpecific(
|
await fetchMock.resolveSpecific(
|
||||||
["http://127.0.0.1:9999/api-kube/apis/autoscaling"],
|
["https://127.0.0.1:12345/api-kube/apis/autoscaling"],
|
||||||
createMockResponseFromString("http://127.0.0.1:9999/api-kube/apis/autoscaling", JSON.stringify({
|
createMockResponseFromString("https://127.0.0.1:12345/api-kube/apis/autoscaling", JSON.stringify({
|
||||||
apiVersion: "v1",
|
apiVersion: "v1",
|
||||||
kind: "APIGroup",
|
kind: "APIGroup",
|
||||||
name: "autoscaling",
|
name: "autoscaling",
|
||||||
@ -817,7 +817,7 @@ describe("KubeApi", () => {
|
|||||||
|
|
||||||
it("requests resources from the non preferred version from the initial apiBase", () => {
|
it("requests resources from the non preferred version from the initial apiBase", () => {
|
||||||
expect(fetchMock.mock.lastCall).toMatchObject([
|
expect(fetchMock.mock.lastCall).toMatchObject([
|
||||||
"http://127.0.0.1:9999/api-kube/apis/autoscaling/v2",
|
"https://127.0.0.1:12345/api-kube/apis/autoscaling/v2",
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user