---
FunctionApplication {
    function: Variable {
        identifier: "import",
        position: (1, 1),
    },
    arguments: [
        Path {
            parts: [
                Raw {
                    content: "./make-test-python.nix",
                    position: (1, 8),
                },
            ],
        },
        Function {
            argument: None,
            arguments: FunctionArguments {
                arguments: [
                    FunctionArgument {
                        identifier: "pkgs",
                        default: None,
                    },
                ],
                ellipsis: true,
            },
            definition: Map {
                bindings: [
                    KeyValue(
                        AttributePath {
                            attributes: [
                                Raw {
                                    content: "name",
                                    position: (2, 3),
                                },
                            ],
                        },
                        String {
                            parts: [
                                Raw {
                                    content: "nginx-sandbox",
                                    position: (2, 11),
                                },
                            ],
                        },
                    ),
                    KeyValue(
                        AttributePath {
                            attributes: [
                                Raw {
                                    content: "meta",
                                    position: (3, 3),
                                },
                            ],
                        },
                        With {
                            expression: PropertyAccess {
                                expression: Variable {
                                    identifier: "pkgs",
                                    position: (3, 15),
                                },
                                attribute_path: AttributePath {
                                    attributes: [
                                        Raw {
                                            content: "lib",
                                            position: (3, 20),
                                        },
                                        Raw {
                                            content: "maintainers",
                                            position: (3, 24),
                                        },
                                    ],
                                },
                                default: None,
                            },
                            target: Map {
                                bindings: [
                                    KeyValue(
                                        AttributePath {
                                            attributes: [
                                                Raw {
                                                    content: "maintainers",
                                                    position: (4, 5),
                                                },
                                            ],
                                        },
                                        List {
                                            elements: [
                                                Variable {
                                                    identifier: "izorkin",
                                                    position: (4, 21),
                                                },
                                            ],
                                        },
                                    ),
                                ],
                                recursive: false,
                            },
                        },
                    ),
                    KeyValue(
                        AttributePath {
                            attributes: [
                                Raw {
                                    content: "nodes",
                                    position: (9, 3),
                                },
                                Raw {
                                    content: "machine",
                                    position: (9, 9),
                                },
                            ],
                        },
                        Function {
                            argument: None,
                            arguments: FunctionArguments {
                                arguments: [
                                    FunctionArgument {
                                        identifier: "pkgs",
                                        default: None,
                                    },
                                ],
                                ellipsis: true,
                            },
                            definition: Map {
                                bindings: [
                                    KeyValue(
                                        AttributePath {
                                            attributes: [
                                                Raw {
                                                    content: "nixpkgs",
                                                    position: (10, 5),
                                                },
                                                Raw {
                                                    content: "overlays",
                                                    position: (10, 13),
                                                },
                                            ],
                                        },
                                        List {
                                            elements: [
                                                Function {
                                                    argument: Some(
                                                        "self",
                                                    ),
                                                    arguments: FunctionArguments {
                                                        arguments: [],
                                                        ellipsis: false,
                                                    },
                                                    definition: Function {
                                                        argument: Some(
                                                            "super",
                                                        ),
                                                        arguments: FunctionArguments {
                                                            arguments: [],
                                                            ellipsis: false,
                                                        },
                                                        definition: Map {
                                                            bindings: [
                                                                KeyValue(
                                                                    AttributePath {
                                                                        attributes: [
                                                                            Raw {
                                                                                content: "nginx-lua",
                                                                                position: (12, 9),
                                                                            },
                                                                        ],
                                                                    },
                                                                    FunctionApplication {
                                                                        function: PropertyAccess {
                                                                            expression: Variable {
                                                                                identifier: "super",
                                                                                position: (12, 21),
                                                                            },
                                                                            attribute_path: AttributePath {
                                                                                attributes: [
                                                                                    Raw {
                                                                                        content: "nginx",
                                                                                        position: (12, 27),
                                                                                    },
                                                                                    Raw {
                                                                                        content: "override",
                                                                                        position: (12, 33),
                                                                                    },
                                                                                ],
                                                                            },
                                                                            default: None,
                                                                        },
                                                                        arguments: [
                                                                            Map {
                                                                                bindings: [
                                                                                    KeyValue(
                                                                                        AttributePath {
                                                                                            attributes: [
                                                                                                Raw {
                                                                                                    content: "modules",
                                                                                                    position: (13, 11),
                                                                                                },
                                                                                            ],
                                                                                        },
                                                                                        List {
                                                                                            elements: [
                                                                                                PropertyAccess {
                                                                                                    expression: Variable {
                                                                                                        identifier: "pkgs",
                                                                                                        position: (14, 13),
                                                                                                    },
                                                                                                    attribute_path: AttributePath {
                                                                                                        attributes: [
                                                                                                            Raw {
                                                                                                                content: "nginxModules",
                                                                                                                position: (14, 18),
                                                                                                            },
                                                                                                            Raw {
                                                                                                                content: "lua",
                                                                                                                position: (14, 31),
                                                                                                            },
                                                                                                        ],
                                                                                                    },
                                                                                                    default: None,
                                                                                                },
                                                                                            ],
                                                                                        },
                                                                                    ),
                                                                                ],
                                                                                recursive: false,
                                                                            },
                                                                        ],
                                                                    },
                                                                ),
                                                            ],
                                                            recursive: false,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    ),
                                    KeyValue(
                                        AttributePath {
                                            attributes: [
                                                Raw {
                                                    content: "services",
                                                    position: (19, 5),
                                                },
                                                Raw {
                                                    content: "nginx",
                                                    position: (19, 14),
                                                },
                                                Raw {
                                                    content: "enable",
                                                    position: (19, 20),
                                                },
                                            ],
                                        },
                                        Variable {
                                            identifier: "true",
                                            position: (19, 29),
                                        },
                                    ),
                                    KeyValue(
                                        AttributePath {
                                            attributes: [
                                                Raw {
                                                    content: "services",
                                                    position: (20, 5),
                                                },
                                                Raw {
                                                    content: "nginx",
                                                    position: (20, 14),
                                                },
                                                Raw {
                                                    content: "package",
                                                    position: (20, 20),
                                                },
                                            ],
                                        },
                                        PropertyAccess {
                                            expression: Variable {
                                                identifier: "pkgs",
                                                position: (20, 30),
                                            },
                                            attribute_path: AttributePath {
                                                attributes: [
                                                    Raw {
                                                        content: "nginx-lua",
                                                        position: (20, 35),
                                                    },
                                                ],
                                            },
                                            default: None,
                                        },
                                    ),
                                    KeyValue(
                                        AttributePath {
                                            attributes: [
                                                Raw {
                                                    content: "services",
                                                    position: (21, 5),
                                                },
                                                Raw {
                                                    content: "nginx",
                                                    position: (21, 14),
                                                },
                                                Raw {
                                                    content: "virtualHosts",
                                                    position: (21, 20),
                                                },
                                                Raw {
                                                    content: "localhost",
                                                    position: (21, 33),
                                                },
                                            ],
                                        },
                                        Map {
                                            bindings: [
                                                KeyValue(
                                                    AttributePath {
                                                        attributes: [
                                                            Raw {
                                                                content: "extraConfig",
                                                                position: (22, 7),
                                                            },
                                                        ],
                                                    },
                                                    String {
                                                        parts: [
                                                            Raw {
                                                                content: "location /test1-write {\n  content_by_lua_block {\n    local create = os.execute(",
                                                                position: (23, 1),
                                                            },
                                                            Raw {
                                                                content: "'",
                                                                position: (25, 39),
                                                            },
                                                            Expression {
                                                                expression: PropertyAccess {
                                                                    expression: Variable {
                                                                        identifier: "pkgs",
                                                                        position: (25, 42),
                                                                    },
                                                                    attribute_path: AttributePath {
                                                                        attributes: [
                                                                            Raw {
                                                                                content: "coreutils",
                                                                                position: (25, 47),
                                                                            },
                                                                        ],
                                                                    },
                                                                    default: None,
                                                                },
                                                            },
                                                            Raw {
                                                                content: "/bin/mkdir /tmp/test1-read')\n    local create = os.execute(",
                                                                position: (25, 57),
                                                            },
                                                            Raw {
                                                                content: "'",
                                                                position: (26, 39),
                                                            },
                                                            Expression {
                                                                expression: PropertyAccess {
                                                                    expression: Variable {
                                                                        identifier: "pkgs",
                                                                        position: (26, 42),
                                                                    },
                                                                    attribute_path: AttributePath {
                                                                        attributes: [
                                                                            Raw {
                                                                                content: "coreutils",
                                                                                position: (26, 47),
                                                                            },
                                                                        ],
                                                                    },
                                                                    default: None,
                                                                },
                                                            },
                                                            Raw {
                                                                content: "/bin/touch /tmp/test1-read/foo.txt')\n    local echo = os.execute(",
                                                                position: (26, 57),
                                                            },
                                                            Raw {
                                                                content: "'",
                                                                position: (27, 37),
                                                            },
                                                            Expression {
                                                                expression: PropertyAccess {
                                                                    expression: Variable {
                                                                        identifier: "pkgs",
                                                                        position: (27, 40),
                                                                    },
                                                                    attribute_path: AttributePath {
                                                                        attributes: [
                                                                            Raw {
                                                                                content: "coreutils",
                                                                                position: (27, 45),
                                                                            },
                                                                        ],
                                                                    },
                                                                    default: None,
                                                                },
                                                            },
                                                            Raw {
                                                                content: "/bin/echo worked > /tmp/test1-read/foo.txt')\n  }\n}\nlocation /test1-read {\n  root /tmp;\n}\nlocation /test2-write {\n  content_by_lua_block {\n    local create = os.execute(",
                                                                position: (27, 55),
                                                            },
                                                            Raw {
                                                                content: "'",
                                                                position: (35, 39),
                                                            },
                                                            Expression {
                                                                expression: PropertyAccess {
                                                                    expression: Variable {
                                                                        identifier: "pkgs",
                                                                        position: (35, 42),
                                                                    },
                                                                    attribute_path: AttributePath {
                                                                        attributes: [
                                                                            Raw {
                                                                                content: "coreutils",
                                                                                position: (35, 47),
                                                                            },
                                                                        ],
                                                                    },
                                                                    default: None,
                                                                },
                                                            },
                                                            Raw {
                                                                content: "/bin/mkdir /var/web/test2-read')\n    local create = os.execute(",
                                                                position: (35, 57),
                                                            },
                                                            Raw {
                                                                content: "'",
                                                                position: (36, 39),
                                                            },
                                                            Expression {
                                                                expression: PropertyAccess {
                                                                    expression: Variable {
                                                                        identifier: "pkgs",
                                                                        position: (36, 42),
                                                                    },
                                                                    attribute_path: AttributePath {
                                                                        attributes: [
                                                                            Raw {
                                                                                content: "coreutils",
                                                                                position: (36, 47),
                                                                            },
                                                                        ],
                                                                    },
                                                                    default: None,
                                                                },
                                                            },
                                                            Raw {
                                                                content: "/bin/touch /var/web/test2-read/bar.txt')\n    local echo = os.execute(",
                                                                position: (36, 57),
                                                            },
                                                            Raw {
                                                                content: "'",
                                                                position: (37, 37),
                                                            },
                                                            Expression {
                                                                expression: PropertyAccess {
                                                                    expression: Variable {
                                                                        identifier: "pkgs",
                                                                        position: (37, 40),
                                                                    },
                                                                    attribute_path: AttributePath {
                                                                        attributes: [
                                                                            Raw {
                                                                                content: "coreutils",
                                                                                position: (37, 45),
                                                                            },
                                                                        ],
                                                                    },
                                                                    default: None,
                                                                },
                                                            },
                                                            Raw {
                                                                content: "/bin/echo error-worked > /var/web/test2-read/bar.txt')\n  }\n}\nlocation /test2-read {\n  root /var/web;\n}\n",
                                                                position: (37, 55),
                                                            },
                                                        ],
                                                    },
                                                ),
                                            ],
                                            recursive: false,
                                        },
                                    ),
                                    KeyValue(
                                        AttributePath {
                                            attributes: [
                                                Raw {
                                                    content: "users",
                                                    position: (45, 5),
                                                },
                                                Raw {
                                                    content: "users",
                                                    position: (45, 11),
                                                },
                                                Raw {
                                                    content: "foo",
                                                    position: (45, 17),
                                                },
                                                Raw {
                                                    content: "isNormalUser",
                                                    position: (45, 21),
                                                },
                                            ],
                                        },
                                        Variable {
                                            identifier: "true",
                                            position: (45, 36),
                                        },
                                    ),
                                ],
                                recursive: false,
                            },
                        },
                    ),
                    KeyValue(
                        AttributePath {
                            attributes: [
                                Raw {
                                    content: "testScript",
                                    position: (48, 3),
                                },
                            ],
                        },
                        String {
                            parts: [
                                Raw {
                                    content: "machine.wait_for_unit(\"nginx\")\nmachine.wait_for_open_port(80)\n\n# Checking write in temporary folder\nmachine.succeed(\"$(curl -vvv http://localhost/test1-write)\")\nmachine.succeed('test \"$(curl -fvvv http://localhost/test1-read/foo.txt)\" = worked')\n\n# Checking write in protected folder. In sandbox mode for the nginx service, the folder /var/web is mounted\n# in read-only mode.\nmachine.succeed(\"mkdir -p /var/web\")\nmachine.succeed(\"chown nginx:nginx /var/web\")\nmachine.succeed(\"$(curl -vvv http://localhost/test2-write)\")\nassert \"404 Not Found\" in machine.succeed(\n    \"curl -vvv -s http://localhost/test2-read/bar.txt\"\n)\n",
                                    position: (49, 1),
                                },
                            ],
                        },
                    ),
                ],
                recursive: false,
            },
        },
    ],
}