Skip to content

Fix "auth describe" integration test #2010

@pietern

Description

@pietern

Describe the issue

This test fails in integration test runs. It has not run before because it was missing the "TestAcc" function name prefix. The failure happens because the test asserts a failure to resolve auth, while during the integration test run it is able to authenticate.

I observed this working on #2009 (the test is skipped in this PR).

A snippet of the failing test output:

=== FAIL: integration/cmd/auth TestAuthDescribeFailure (re-run 2) (0.75s)
    describe_test.go:38: ***
    runner.go:303: run args: [auth, describe, --profile, nonexistent]
    runner.go:198: [databricks stdout]: Host: ***
    runner.go:198: [databricks stdout]: User: ***
    runner.go:198: [databricks stdout]: Authenticated with: oauth-m2m
    runner.go:198: [databricks stdout]: -----
    runner.go:198: [databricks stdout]: Current configuration:
    runner.go:198: [databricks stdout]:   ✓ host: *** (from DATABRICKS_HOST environment variable)
    runner.go:198: [databricks stdout]:   ✓ profile: nonexistent (from --profile flag)

    [...]

    describe_test.go:44: 
        	Error Trace:	integration/cmd/auth/describe_test.go:44
        	Error:      	"Host: ***\nUser: ***\nAuthenticated with: oauth-m2m\n-----\nCurrent configuration:\n  ✓ host: *** (from DATABRICKS_HOST environment variable)\n  ✓ profile: nonexistent (from --profile flag)\n  [...]\n" does not contain "Unable to authenticate: resolve"
        	Test:       	TestAuthDescribeFailure

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions