Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
remove /cluster-monitoring test
Browse files Browse the repository at this point in the history
  • Loading branch information
oksana-grishchenko committed Feb 9, 2024
1 parent e605f76 commit 1e3cf51
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 35 deletions.
4 changes: 2 additions & 2 deletions api-tests/tests/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { expect, test } from '@playwright/test'

// testPrefix is used to differentiate between several workers
// running this test to avoid conflicts in instance names
export const testPrefix = () => `t${(Math.random() + 1).toString(36).substring(10)}`
export const testPrefix = `t${(Math.random() + 1).toString(36).substring(10)}`

export const suffixedName = (name) => {
return `${name}-${testPrefix()}`
return `${name}-${testPrefix}`
}

export const checkError = async response => {
Expand Down
32 changes: 0 additions & 32 deletions api-tests/tests/kubernetes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,6 @@ test('get resource usage', async ({ request }) => {
expect(resources?.available).toBeTruthy()
})

test('enable/disable cluster-monitoring', async ({ request }) => {
const data = {
type: 'pmm',
name: `${testPrefix}-monit`,
url: 'http://monitoring',
targetNamespaces: [testsNs],
pmm: {
apiKey: '123',
},
}

const response = await request.post('/v1/monitoring-instances', { data })

await checkError(response)
const created = await response.json()

const rEnable = await request.post(`/v1/cluster-monitoring`, {
data: {
enable: true,
monitoringInstanceName: created.name,
},
})

await checkError(rEnable)

const rDisable = await request.post(`/v1/cluster-monitoring`, {
data: { enable: false },
})

await checkError(rDisable)
})

test('get cluster info', async ({ request }) => {
const r = await request.get(`/v1/cluster-info`)
const info = await r.json()
Expand Down
2 changes: 1 addition & 1 deletion api-tests/tests/monitoring-instances.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ test('get monitoring instance', async ({ request }) => {
})

test('delete monitoring instance', async ({ request }) => {
const namePrefix = 'delete-'
const namePrefix = 'del-'
const names = await createInstances(request, namePrefix)
const name = names[1]

Expand Down

0 comments on commit 1e3cf51

Please sign in to comment.