fix(gre): сохранять и восстанавливать статические IPv6 адреса
This commit is contained in:
1 parent
655ea9727f
commit
f3cbc32720
21 files changed
+1643
-60
No files matched your search
@@ -13,7 +13,7 @@ for (const mode of ["create", "dto", "edit"]) {
|
||||
if (route.request().method() === (mode === "edit" ? "PATCH" : "POST")) {
|
||||
attempts++
|
||||
expect(path).toBe("/api/gre/tunnels")
|
||||
expect(route.request().postDataJSON()).toMatchObject({ serverId: "1", name: "gre-test", remoteAddress: "192.0.2.9", remoteInnerIp, comment: "сохранённый ввод" })
|
||||
expect(route.request().postDataJSON()).toMatchObject({ serverId: "1", name: "gre-test", remoteAddress: "192.0.2.9", remoteInnerIp, localInnerIp: mode === "edit" ? "" : "fd00:151::1/64", comment: "сохранённый ввод" })
|
||||
if (mode === "edit") expect(route.request().postDataJSON().rosId).toBe("*T/1")
|
||||
if (attempts === 1) { await gate; return route.fulfill({ status: 403, json: { error: "Запись запрещена тест" } }) }
|
||||
if (attempts === 2) return route.fulfill({ json: {} })
|
||||
@@ -40,6 +40,7 @@ for (const mode of ["create", "dto", "edit"]) {
|
||||
await sheet.getByLabel("Удалённый адрес").fill("192.0.2.9")
|
||||
await sheet.getByLabel("Комментарий").fill("сохранённый ввод")
|
||||
await sheet.getByLabel("Удалённый IP", { exact: true }).fill(remoteInnerIp)
|
||||
await sheet.getByLabel("Локальный IP", { exact: true }).fill(mode === "edit" ? "" : "fd00:151::1/64")
|
||||
const submit = sheet.getByRole("button", { name: mode === "edit" ? "Сохранить" : "Создать туннель", exact: true })
|
||||
await submit.evaluate(button => { (button as HTMLButtonElement).click(); (button as HTMLButtonElement).click() })
|
||||
await expect.poll(() => attempts).toBe(1)
|
||||
|
||||
Reference in new issue
Block a user