Skip to content

Operations for a given service (e.g. restore) should only verify presence of dependency tools needed for that service #3533

@danieljurek

Description

@danieljurek

This test fails if docker is not installed on the machine: https://github.com/Azure/azure-dev/blob/main/cli/azd/test/functional/restore_test.go#L81-L110

In this case a csharp service is being restored in a project that contains many other types of projects (including one which requires docker). Azd never uses the docker command during the restore but it does verify that docker is present and will fail if docker is not present.

    cli.go:227: 30ms [stdout] Restoring services (azd restore)
    cli.go:227: 30ms [stdout] 
    cli.go:227: 774ms [stdout] 
    cli.go:227: 774ms [stdout] ERROR: required external tools are missing:
    cli.go:227: 774ms [stdout]  - Docker is not installed, see https://aka.ms/azure-dev/docker-install to install
    restore_test.go:107: 
          Error Trace:  /Users/runner/work/1/s/cli/azd/test/functional/restore_test.go:107
          Error:        Received unexpected error:
                        command 'azd restore in /var/folders/g9/4hls9p_s22bdrc8v5gzytvxc0000gn/T/Test_CLI_Restore_InServiceDirectory820887472/001/csharpapp' had non-zero exit code: exit status 1
          Test:         Test_CLI_Restore_InServiceDirectory
--- FAIL: Test_CLI_Restore_InServiceDirectory (0.84s)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions