Merge branch 'develop' of github.com:Budibase/budibase into feature/table-fetching-frontend

This commit is contained in:
mike12345567 2023-06-12 16:16:12 +01:00
commit 2486937c43
5 changed files with 21 additions and 5 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "2.7.7-alpha.2", "version": "2.7.7-alpha.3",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/backend-core", "packages/backend-core",

View File

@ -26,6 +26,10 @@ export default function process(updateCb?: UpdateCallback) {
// if something not found - no changes to perform // if something not found - no changes to perform
if (err?.status === 404) { if (err?.status === 404) {
return return
}
// The user has already been sync in another process
else if (err?.status === 409) {
return
} else { } else {
logging.logAlert("Failed to perform user/group app sync", err) logging.logAlert("Failed to perform user/group app sync", err)
} }

View File

@ -15,6 +15,12 @@ async function generateReport() {
return JSON.parse(report) return JSON.parse(report)
} }
const env = process.argv.slice(2)[0]
if (!env) {
throw new Error("environment argument is required")
}
async function discordResultsNotification(report) { async function discordResultsNotification(report) {
const { const {
numTotalTestSuites, numTotalTestSuites,
@ -39,8 +45,8 @@ async function discordResultsNotification(report) {
content: `**Nightly Tests Status**: ${OUTCOME}`, content: `**Nightly Tests Status**: ${OUTCOME}`,
embeds: [ embeds: [
{ {
title: "Budi QA Bot", title: `Budi QA Bot - ${env}`,
description: `Nightly Tests`, description: `API Integration Tests`,
url: GITHUB_ACTIONS_RUN_URL, url: GITHUB_ACTIONS_RUN_URL,
color: OUTCOME === "success" ? 3066993 : 15548997, color: OUTCOME === "success" ? 3066993 : 15548997,
timestamp: new Date(), timestamp: new Date(),

View File

@ -60,8 +60,13 @@ export default class AccountAPI {
} }
async delete(accountID: string) { async delete(accountID: string) {
const [response, json] = await this.client.del(`/api/accounts/${accountID}`) const [response, json] = await this.client.del(`/api/accounts/${accountID}`, {
expect(response).toHaveStatusCode(200) internal: true,
})
// can't use expect here due to use in global teardown
if (response.status !== 204) {
throw new Error(`Could not delete accountId=${accountID}`)
}
return response return response
} }
} }

View File

@ -10,6 +10,7 @@ const API_OPTS: APIRequestOpts = { doExpect: false }
async function deleteAccount() { async function deleteAccount() {
// @ts-ignore // @ts-ignore
const accountID = global.qa.accountId const accountID = global.qa.accountId
// can't run 'expect' blocks in teardown
await accountsApi.accounts.delete(accountID) await accountsApi.accounts.delete(accountID)
} }