小编s00*_*433的帖子

QueryFailedError: SQLITE_MISUSE: 数据库句柄已关闭(sqllite 内存 Jest 测试)

import app from "../src/app";\nimport request from "supertest";\nimport { createConnection, getConnection, getRepository } from "typeorm";\nimport { Group } from "../src/entity";\n\nbeforeEach(() => {\n    return createConnection({\n        type: "sqlite",\n        database: ":memory:",\n        dropSchema: true,\n        entities: ["src/entity/**/*.ts"],\n        synchronize: true,\n        logging: false,\n    });\n});\n\nafterEach(() => {\n    const conn = getConnection();\n    return conn.close();\n});\n\nconst group = new Group();\ngroup.creator_account_id = 1;\ngroup.group_name = "cook101";\ngroup.group_description = "cook101 with best chef";\ngroup.photoName = "cook101";\ngroup.photoUrl = "http://www.youtube.com/sd.jpg";\ngroup.photoKey = "cook101chef";\n\n\n// subscribe group\ndescribe("/subscribe/:group_id/:account_id route test", () => {\n    it("Should return a status of 201 with json data", async …
Run Code Online (Sandbox Code Playgroud)

memory sqlite testing ts-jest

6
推荐指数
1
解决办法
1457
查看次数

错误:读取 EKS Cluster ():运行 terraform plan 时找不到资源

我的地形文件如下。

\n
    \n
  • 模块eks版本:19.5.1
  • \n
\n
data "aws_eks_cluster" "cluster" {\n  name = module.eks.cluster_name\n}\n\ndata "aws_eks_cluster_auth" "cluster" {\n  name = module.eks.cluster_name\n}\n\nprovider "kubernetes" {\n  host                   = data.aws_eks_cluster.cluster.endpoint\n  cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)\n  token                  = data.aws_eks_cluster_auth.cluster.token\n}\n\nmodule "eks" {\n  source  = "terraform-aws-modules/eks/aws"\n  version = "19.5.1" //19.0 version created the ingress security group for us\n...}\n
Run Code Online (Sandbox Code Playgroud)\n

运行“terraform plan”时,出现错误:

\n
\n\xe2\x94\x82 Error: reading EKS Cluster (ccc): couldn\'t find resource\n\xe2\x94\x82 \n\xe2\x94\x82   with data.aws_eks_cluster.cluster,\n\xe2\x94\x82   on main.tf line 7, in data "aws_eks_cluster" "cluster":\n\xe2\x94\x82    7: data "aws_eks_cluster" "cluster" {\n\xe2\x94\x82 \n\xe2\x95\xb5\n
Run Code Online (Sandbox Code Playgroud)\n

kubernetes terraform amazon-eks

1
推荐指数
2
解决办法
3119
查看次数

标签 统计

amazon-eks ×1

kubernetes ×1

memory ×1

sqlite ×1

terraform ×1

testing ×1

ts-jest ×1