Skip to content

Commit

Permalink
Merge pull request #651 from kravciak/1.11.0-rc
Browse files Browse the repository at this point in the history
Install 1.11.0-rc for PR tests
  • Loading branch information
kravciak authored Mar 18, 2024
2 parents f45d136 + 70b5d3d commit 1a71314
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
24 changes: 23 additions & 1 deletion tests/e2e/00-installation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,28 @@ test('06 Upgrade Kubewarden', async({ page, nav, shell }) => {
// Check resources are online and with right versions
await nav.explorer('Apps', 'Installed Apps')
await apps.checkChart('rancher-kubewarden-defaults', last.defaults)
await shell.waitPods()
})
})

// Extra test to validate audit scanner UI PRs
test('06a Upgrade KW 1.10.0 to 1.11.0-rc', async({ page }) => {
test.skip(UPGRADE || FLEET || ORIGIN !== 'source')

const apps = new RancherAppsPage(page)
const kwPage = new KubewardenPage(page)

const current = (await kwPage.getCurrentVersion()).app
if (current === 'v1.10.0') {
await apps.updateApp('rancher-kubewarden-controller', { version: 0, yamlPatch: (y) => { y.auditScanner.image.tag = 'latest' } })
await apps.updateApp('rancher-kubewarden-defaults', { version: 0 })
}
})

test('09 Check resources are active', async({ page, nav, shell }) => {
const apps = new RancherAppsPage(page)
await nav.explorer('Apps', 'Installed Apps')
for (const chart of ['controller', 'crds', 'defaults']) {
await apps.checkChart(`rancher-kubewarden-${chart}`)
}
await shell.waitPods()
})
8 changes: 8 additions & 0 deletions tests/e2e/pages/kubewarden.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ export class KubewardenPage extends BasePage {
return this.getPane(pane).locator('span.numbers-stats')
}

@step
async getCurrentVersion(): Promise<AppVersion> {
await this.nav.kubewarden()
const verText = await this.currentVer.innerText()
const parts = verText.split(/\s+/)
return { app: parts[2] }
}

@step
async getUpgrade(): Promise<AppVersion|null> {
await this.nav.kubewarden()
Expand Down

0 comments on commit 1a71314

Please sign in to comment.