Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sheet
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The files an imported CUA task's download setup brings, as the environment of the computer desk: keyed by their
# paths under its session user's home.
type = "environment"
environment_name = "desk"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
note
3 changes: 3 additions & 0 deletions tst/integration/computer/computer_files/envs/desk/env.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type = "computer"
computer = "ubuntu-24.04"
driver = "reference"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
type = "multi"
computer_envs = ["desk"]
6 changes: 6 additions & 0 deletions tst/integration/computer/computer_files/tasks/load.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{"id": "env", "type": "deploy_env", "env_id": "office"},
{"id": "files", "type": "load_artifact", "env_id": "office", "artifact_id": "desk_files", "depends_on": ["env"]},
{"id": "read", "type": "computer_exec", "env_id": "office", "depends_on": ["files"],
"command": "cat Desktop/a.csv notes/b.txt"}
]
24 changes: 24 additions & 0 deletions tst/integration/computer/computer_files_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""Files into a multi env's computer, end to end: a multi env of one ubuntu-24.04 computer with the reference driver
deployed, an environment artifact named after that computer loaded into the multi env, as an imported CUA task's
download setup brings it, its files at their paths under the computer's session user's home, and read there by
computer_exec."""

from pathlib import Path

import pytest
from click.testing import CliRunner

from agent_env.cli import cli
from tst.integration.computer.conftest import run_context

pytestmark = [pytest.mark.integration, pytest.mark.int_test_slow]

BUNDLE = Path(__file__).parent / "computer_files"


def test_an_environment_named_after_a_multi_envs_computer_loads_into_it(state):
ran = CliRunner().invoke(cli, ["run", str(BUNDLE), "--task", "load", "--no-emulate"])

assert ran.exit_code == 0, ran.output
read = run_context(ran.output)["metadata"]["computer_exec"]["read"]
assert read["exit_code"] == 0 and read["stdout"] == "sheet\nnote\n", read
Loading