diff --git a/dist/clusters.spec.js b/dist/clusters.spec.js index 8253d18..20f3a63 100644 --- a/dist/clusters.spec.js +++ b/dist/clusters.spec.js @@ -131,9 +131,9 @@ describe('upgradeCluster', () => { const mockServer = mockttp.getLocal(); const apiClient = new configuration_1.VendorPortalApi(); apiClient.apiToken = "abcd1234"; - apiClient.endpoint = "http://localhost:30880"; beforeEach(async () => { - mockServer.start(30880); + await mockServer.start(); + apiClient.endpoint = `http://localhost:${mockServer.port}`; }); afterEach(async () => { mockServer.stop(); @@ -151,9 +151,9 @@ describe('pollForCluster', () => { const mockServer = mockttp.getLocal(); const apiClient = new configuration_1.VendorPortalApi(); apiClient.apiToken = "abcd1234"; - apiClient.endpoint = "http://localhost:30880"; beforeEach(async () => { - mockServer.start(30880); + await mockServer.start(); + apiClient.endpoint = `http://localhost:${mockServer.port}`; }); afterEach(async () => { mockServer.stop(); diff --git a/pacts/npm_consumer-vp_service.json b/pacts/npm_consumer-vp_service.json index d5a0b3a..62588d2 100644 --- a/pacts/npm_consumer-vp_service.json +++ b/pacts/npm_consumer-vp_service.json @@ -70,13 +70,15 @@ "providerState": "cluster created", "request": { "body": { - "kubernetes_distribution": "kind", - "kubernetes_version": "v1.25.1", + "kubernetes_distribution": "eks", + "kubernetes_version": "v1.29", "name": "cluster1", - "tags": [ + "node_groups": [ { - "key": "foo", - "value": "bar" + "disk_gib": 100, + "instance_type": "r1.medium", + "name": "foo", + "node_count": 3 } ], "ttl": "10m" diff --git a/src/clusters.spec.ts b/src/clusters.spec.ts index f72f5b2..b5acb4f 100644 --- a/src/clusters.spec.ts +++ b/src/clusters.spec.ts @@ -147,11 +147,11 @@ describe('upgradeCluster', () => { const mockServer = mockttp.getLocal(); const apiClient = new VendorPortalApi(); apiClient.apiToken = "abcd1234"; - apiClient.endpoint = "http://localhost:30880"; beforeEach(async () => { - mockServer.start(30880); + await mockServer.start(); + apiClient.endpoint = `http://localhost:${mockServer.port}`; }); afterEach(async () => { @@ -174,10 +174,10 @@ describe('pollForCluster', () => { const mockServer = mockttp.getLocal(); const apiClient = new VendorPortalApi(); apiClient.apiToken = "abcd1234"; - apiClient.endpoint = "http://localhost:30880"; beforeEach(async () => { - mockServer.start(30880); + await mockServer.start(); + apiClient.endpoint = `http://localhost:${mockServer.port}`; }); afterEach(async () => {