diff --git a/e2e/config-test.toml b/e2e/config-test.toml index a91d5e6bce..7efc1f8b94 100644 --- a/e2e/config-test.toml +++ b/e2e/config-test.toml @@ -1,39 +1,11 @@ [general] -# apiEndpoint = "http://localhost:8090" -# apiEndpoint = "http://127.0.0.1:8090" -# apiEndpoint = "http://10.100.11.1:8090" -# apiEndpoint = "https://dogbowl.cloud.backend.ai" -# apiEndpoint = "http://10.82.230.101:8090" -# apiEndpoint = "http://10.100.64.15:8090" -# apiEndpoint ="https://aitrain.ktcloud.com" - - -# apiEndpoint = "http://10.82.230.94:8090" -# apiEndpoint = "http://10.82.230.101:8090" -# apiEndpoint = "https://cloud.backend.ai" -#apiEndpoint = "http://10.82.230.115:8090" -# apiEndpoint = "http://10.172.160.61:8080" -# apiEndpoint = "http://10.82.230.230:8090" -# apiEndpoint = "https://www.nipa2023.ktcloud.com:8000" -# apiEndpoint = "https://cloud.backend.ai" -# apiEndpoint = "http://0.0.0.0:8090" -# apiEndpoint = "http://10.100.64.13:8090" -# apiEndpoint = "http://10.20.30.10:9004" +apiEndpoint = "http://127.0.0.1:8090" apiEndpointText = "Backend.AI Admin Training" -# defaultSessionEnvironment = "cr.backend.ai/testing/mojo:2309" -# defaultSessionEnvironment = "cr.backend.ai/stable/python" + defaultSessionEnvironment = "cr.backend.ai/stable/python-tensorflow" -# defaultSessionEnvironment = "cr.backend.ai/community/spectravis:19.10" maxCountForPreOpenedPort = 1 -# defaultSessionEnvironment = "cr.backend.ai/stable/python:3.8-ubuntu20.04-arm64" - -#defaultSessionEnvironment = "[Default session kernel. If blank, alphabetically first kernel will be default.]" -# defaultImportEnvironment = "cr.backend.ai/stable/python:3.8-ubuntu20.04-arm64" -# defaultImportEnvironment = "cr.backend.ai/multiarch/python:3.9-ubuntu20.04-aarch64" -# defaultImportEnvironment = "cr.backend.ai/multiarch/python:3.9-ubuntu20.04" -# defaultImportEnvironment = "cr.backend.ai/stable/python" -siteDescription = "NIPA NPU Farm" +# siteDescription = "" connectionMode = "SESSION" #connectionMode = API allowChangeSigninMode = true signupSupport = true @@ -56,23 +28,15 @@ alwaysEnqueueComputeSession = true showCustomResourceAllocation = true enable2FA = true force2FA = false -# systemSSHImage = "cr.backend.ai/testing/filebrowser:23.04-ubuntu20.04-arm64" -# systemSSHImage = "cr.backend.ai/testing/filebrowser:23.10-amd64" -# cr.backend.ai/testing/filebrowser:23.04-ubuntu20.04 +systemSSHImage = "cr.backend.ai/stable/python-tensorflow" isDirectorySizeVisible = false allowCustomResourceAllocation = true forceTerminateTimeThreshold = 259200 enableModelStore = true enableExtendLoginSession = false -showNonInstalledImages = false [wsproxy] -# proxyURL = "http://10.100.64.15:10200/" proxyURL = "http://127.0.0.1:5050/" -# proxyURL = "http://10.20.30.10:10202" -# proxyURL = "http://10.100.64.13:10202" -#proxyURL = "https://wsproxy.onprem.backend.ai:9443/" -#proxyBaseURL = "" autoPortSelection = true disableCertCheck = true diff --git a/e2e/config.test.ts b/e2e/config.test.ts index e085723db3..c07759e97b 100644 --- a/e2e/config.test.ts +++ b/e2e/config.test.ts @@ -1,10 +1,10 @@ -import { loginAsAdmin, readConfigFileFromPath } from './test-util'; +import { loginAsAdmin, mockConfigToml, webuiEndpoint } from './test-util'; import { test, expect } from '@playwright/test'; test.describe('config read and test', () => { test('should read config file from the path', async ({ page, context }) => { // manipulate config file from mocked one - await readConfigFileFromPath(page, './config-test.toml'); + await mockConfigToml(page, './config-test.toml'); await loginAsAdmin(page); @@ -43,7 +43,7 @@ test.describe('config read and test', () => { const uninstalledImageString = `${registry}/${namespace}/${language}:${version}@${architecture}`; - await page.goto('http://127.0.0.1:9081/summary'); + await page.goto(webuiEndpoint); await page.getByLabel('power_settings_new').click(); await page .getByRole('button', { name: '2 Environments & Resource' }) diff --git a/e2e/test-util.ts b/e2e/test-util.ts index 17e1346ab9..81bd9f1c80 100644 --- a/e2e/test-util.ts +++ b/e2e/test-util.ts @@ -229,7 +229,7 @@ export async function deleteSession(page: Page, sessionName: string) { await expect(page.getByText(sessionName)).toBeHidden(); } -export async function readConfigFileFromPath(page: Page, rawPath) { +export async function mockConfigToml(page: Page, rawPath) { const filePath = path.resolve(__dirname, rawPath); const mockData = await fs.readFile(filePath, 'utf-8'); await page.route('http://127.0.0.1:9081/config.toml', async (route) => { diff --git a/react/src/components/ImageEnvironmentSelectFormItems.tsx b/react/src/components/ImageEnvironmentSelectFormItems.tsx index 56649294a8..5261a8649f 100644 --- a/react/src/components/ImageEnvironmentSelectFormItems.tsx +++ b/react/src/components/ImageEnvironmentSelectFormItems.tsx @@ -93,7 +93,7 @@ const ImageEnvironmentSelectFormItems: React.FC< const envSelectRef = useRef(null); const versionSelectRef = useRef(null); - const ImageEnvironmentSelectFormItemsVariables = baiClient?._config + const imageEnvironmentSelectFormItemsVariables = baiClient?._config ?.showNonInstalledImages ? {} : { installed: true }; @@ -120,7 +120,7 @@ const ImageEnvironmentSelectFormItems: React.FC< } } `, - ImageEnvironmentSelectFormItemsVariables, + imageEnvironmentSelectFormItemsVariables, { fetchPolicy: 'store-and-network', },