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) 我的地形文件如下。
\ndata "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...}\nRun 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\nRun Code Online (Sandbox Code Playgroud)\n