Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
408 stars 198 forks source link

Fix `Test_DevCenter_Client` to work on all developer machines #2944

Open ellismg opened 11 months ago

ellismg commented 11 months ago

When I run Test_DevCenter_Client locally, it fails with this error:

--- FAIL: Test_DevCenter_Client (1.47s)
    developer_client_test.go:77: 
            Error Trace:    /Users/matell/dd/azure/azure-dev/cli/azd/pkg/devcentersdk/developer_client_test.go:77
            Error:          Received unexpected error:
                            failed creating request: devcenter is not set, failed to find dev center endpoint: '' or name: 'wabrez-devcenter'
            Test:           Test_DevCenter_Client
FAIL

I suspect this is because it uses some infrastructure that @wbreza set up.

The test is skipped in CI for now, so this isn't a problem in CI, but it does prevent a clean test run on other dev machines.

ellismg commented 11 months ago

@wbreza, Suspect this will be easy for you to fix and when we do fix it we can start getting coverage in CI as well. I filed this issue because I'm going to expand the skip condition to just always skip for now, linked against this issue.

wbreza commented 11 months ago

This is fine. It was only a sanity test for running locally initially and it did require that the current user have access to some devcenter project to work as expected.


From: Matt Ellis @.> Sent: Thursday, November 9, 2023 11:46:45 AM To: Azure/azure-dev @.> Cc: Mention @.>; Assign @.> Subject: Re: [Azure/azure-dev] Fix Test_DevCenter_Client to work on all developer machines (Issue #2944)

@wbrezahttps://github.com/wbreza, Suspect this will be easy for you to fix and when we do fix it we can start getting coverage in CI as well. I filed this issue because I'm going to expand the skip condition to just always skip for now, linked against this issue.

— Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-dev/issues/2944#issuecomment-1804532853 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABR4W77FXQ3BDGDNFNIFBULYDUXKNBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE2TCMBYHA4TGMJRQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRRHE4DMMRZGE4DEMNHORZGSZ3HMVZKMY3SMVQXIZI. You are receiving this email because you were mentioned.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

vhvb1989 commented 6 months ago

Test is still skip: https://github.com/vhvb1989/azure-dev/blob/main/cli/azd/pkg/devcentersdk/developer_client_test.go#L19

This issue should be opened until the test is re-enabled