Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Jan 11, 2024
1 parent d3faede commit 14abeda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ services:
ports:
- '80:80'
volumes:
- ~/data:/data
- ./data:/data
`)
expectedResult := fmt.Sprintf(`def run(plan):
plan.upload_files(src = "~/data", name = "web--volume0")
plan.upload_files(src = "./data", name = "web--volume0")
plan.add_service(name = "web", config = ServiceConfig(image=ImageBuildSpec(image_name="web%s", build_context_dir="app", target_stage="builder"), ports={"port0": PortSpec(number=80, transport_protocol="TCP")}, files={"/data": "web--volume0"}, env_vars={}))
`, builtImageSuffix)

Expand Down Expand Up @@ -139,7 +139,7 @@ services:
environment:
NODE_ENV: "development"
volumes:
- ~/data:/data
- ./data:/data
- /project/node_modules:/node_modules
entrypoint:
- /bin/echo
Expand All @@ -148,7 +148,7 @@ services:
command: ["echo", "Hello,", "World!"]
`)
expectedResult := fmt.Sprintf(`def run(plan):
plan.upload_files(src = "~/data", name = "web--volume0")
plan.upload_files(src = "./data", name = "web--volume0")
plan.add_service(name = "web", config = ServiceConfig(image=ImageBuildSpec(image_name="web%s", build_context_dir="app", target_stage="builder"), ports={"port0": PortSpec(number=80, transport_protocol="TCP")}, files={"/data": "web--volume0", "/node_modules": Directory(persistent_key="volume1")}, entrypoint=["/bin/echo", "-c", "echo \"Hello\""], cmd=["echo", "Hello,", "World!"], env_vars={"NODE_ENV": "development"}))
`, builtImageSuffix)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test("Test valid Docker Compose package", async () => {
expect(runResult.value.interpretationError).toBeUndefined()
expect(runResult.value.validationErrors).toEqual([])
expect(runResult.value.executionError).toBeUndefined()
expect(runResult.value.instructions).toHaveLength(4)
expect(runResult.value.instructions).toHaveLength(3)
} finally {
stopEnclaveFunction()
}
Expand Down

0 comments on commit 14abeda

Please sign in to comment.