Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented custom Azure CLI token authorizer #282

Merged
merged 6 commits into from
Aug 31, 2020
Merged

Implemented custom Azure CLI token authorizer #282

merged 6 commits into from
Aug 31, 2020

Conversation

nfx
Copy link
Contributor

@nfx nfx commented Aug 30, 2020

make test-azcli

  • access/acceptance.TestAccDatabricksPermissionsResourceFullLifecycle (55.01s)
  • access/acceptance.TestAccSecretAclResource (27.84s)
  • access/acceptance.TestAccSecretResource (33.49s)
  • access/acceptance.TestAccSecretScopeResource (20.60s)
  • compute.TestAccContext (42.35s)
  • compute.TestAccInstancePools (5.78s)
  • compute.TestAccLibraryCreate (42.99s)
  • compute.TestAccListClustersIntegration (267.73s)
  • compute/acceptance.TestAccClusterPolicyResourceFullLifecycle (46.09s)
  • compute/acceptance.TestAccClusterResource_CreateClusterWithLibraries (277.73s)
  • compute/acceptance.TestAccJobResource (19.37s)
  • compute/acceptance.TestAzureAccClusterResource_CreateClusterViaInstancePool (258.02s)
  • identity.TestAccCreateAdminUser (16.12s)
  • identity.TestAccCreateToken (3.57s)
  • identity.TestAccCreateUser (10.23s)
  • identity.TestAccGetAdminGroup (3.76s)
  • identity.TestAccGroup (27.50s)
  • identity.TestAccRoleDifferences (6.64s)
  • identity/acceptance.TestAccGroupMemberResource (81.63s)
  • identity/acceptance.TestAccGroupResource (39.69s)
  • identity/acceptance.TestAccGroupResource_verify_entitlements (25.70s)
  • identity/acceptance.TestAccScimGroupResource (232.37s)
  • identity/acceptance.TestAccScimUserResource (290.30s)
  • identity/acceptance.TestAccTokenResource (19.43s)
  • internal/sanity.TestAccMissingResourcesInWorkspace (3.79s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Cluster_Policies (0.43s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Clusters (0.17s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/DBFS_Files (0.72s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Groups (0.20s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Instance_Pools (0.21s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Jobs (0.22s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Notebooks (0.19s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Secret_ACLs (0.20s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Secret_Scopes (0.19s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Secrets (0.20s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Tokens (0.48s)
  • internal/sanity.TestAccMissingResourcesInWorkspace/Users (0.57s)
  • internal/sanity.TestAccMutiworkspaceUsedFromNormalMode (9.27s)
  • storage.TestAccCreateFile (6.19s)
  • storage.TestAccDeleteInvalidMountFails (4.22s)
  • storage.TestAccInvalidSecretScopeFails (5.30s)
  • storage.TestAccSourceOnInvalidMountFails (28.65s)
  • storage.TestAzureAccBlobMount (142.20s)
  • storage/acceptance.TestAccDatabricksDBFSFile_CreateViaContent (21.01s)
  • storage/acceptance.TestAccDatabricksDBFSFile_CreateViaSource (21.18s)
  • storage/acceptance.TestAzureAccBlobMount_correctly_mounts (680.97s)
  • workspace/acceptance.TestAccNotebookResourceMultipleFormats (38.69s)
  • workspace/acceptance.TestAccNotebookResourceScalability (25.61s)

DONE 53 tests, 5 skipped in 733.609s

* Refresh behavior is triggering approximately every 4 minutes.
* Fixes #275
@nfx nfx added this to the v0.2.4 milestone Aug 30, 2020
@nfx nfx requested a review from stikkireddy August 30, 2020 15:16
@nfx nfx self-assigned this Aug 30, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @nfx,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

2nd Build

View build log

curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v0.4.2/gotestsum_0.4.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
The command "curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v0.4.2/gotestsum_0.4.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum" exited with 0.
$ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
golangci/golangci-lint info checking GitHub for tag 'v1.25.0'
golangci/golangci-lint info found version: 1.25.0 for v1.25.0/linux/amd64
golangci/golangci-lint info installed /home/travis/gopath/bin/golangci-lint
The command "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0" exited with 0.
$ time make lint
✓ Linting source code with golangci-lint make sure you run make fmt ...

real	0m32.618s
user	0m52.610s
sys	0m2.029s
The command "time make lint" exited with 0.
$ time make test
✓ Running tests...
∅  .
✓  access/acceptance (12ms)
✓  access (96ms) (coverage: 83.5% of statements)
=== RUN   TestAzureCliAuth
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:50: 
        	Error Trace:	azure_cli_auth_test.go:50
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:52: 
        	Error Trace:	azure_cli_auth_test.go:52
        	Error:      	"[]" should have 3 item(s), but has 0
        	Test:       	TestAzureCliAuth
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:55: 
        	Error Trace:	azure_cli_auth_test.go:55
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:57: 
        	Error Trace:	azure_cli_auth_test.go:57
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 0
        	Test:       	TestAzureCliAuth
        	Messages:   	There should be only one HTTP call
--- FAIL: TestAzureCliAuth (0.01s)
✖  common (56ms) (coverage: 65.5% of statements)
✓  compute/acceptance (15ms)
✓  compute (766ms) (coverage: 68.3% of statements)
✓  identity (128ms) (coverage: 42.4% of statements)
✓  identity/acceptance (19ms)
✓  internal (38ms) (coverage: 67.5% of statements)
∅  internal/acceptance
✓  internal/qa (15ms) (coverage: 54.4% of statements)
✓  internal/sanity (14ms) (coverage: 100.0% of statements)
✓  mws (1.051s) (coverage: 70.5% of statements)
✓  mws/acceptance (17ms)
=== RUN   TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin] (0.00s)
=== RUN   TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01 (0.00s)
=== RUN   TestProviderConfigurationOptions
--- FAIL: TestProviderConfigurationOptions (0.03s)
✖  provider (50ms) (coverage: 63.4% of statements)
✓  storage (510ms) (coverage: 73.5% of statements)
✓  storage/acceptance (144ms)
✓  workspace (1.069s) (coverage: 66.5% of statements)
✓  workspace/acceptance (12ms)

=== Failed
=== FAIL: common TestAzureCliAuth (0.01s)
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:50: 
        	Error Trace:	azure_cli_auth_test.go:50
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:52: 
        	Error Trace:	azure_cli_auth_test.go:52
        	Error:      	"[]" should have 3 item(s), but has 0
        	Test:       	TestAzureCliAuth
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:55: 
        	Error Trace:	azure_cli_auth_test.go:55
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:57: 
        	Error Trace:	azure_cli_auth_test.go:57
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 0
        	Test:       	TestAzureCliAuth
        	Messages:   	There should be only one HTTP call

=== FAIL: provider TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin] (0.00s)
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin] (0.00s)

=== FAIL: provider TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01 (0.00s)
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01 (0.00s)

=== FAIL: provider TestProviderConfigurationOptions (0.03s)


DONE 552 tests, 67 skipped, 4 failures in 48.480s
Makefile:14: recipe for target 'test' failed
make: *** [test] Error 1

real	0m48.486s
user	0m43.372s
sys	0m5.503s
The command "time make test" exited with 2.
$ time make build
✓ Building source code with go build...

real	0m3.520s
user	0m3.270s
sys	0m0.419s
The command "time make build" exited with 0.
store build cache
changes detected (content changed, file is created, or file is deleted):\n/home/travis/.cache/go-build/00/00065e099a7f43ed74d36ad54cce81bd5184e615159b31dceb88cce843912e07-a
/home/travis/.cache/go-build/00/00510a2a06b38d39a9a6a09b912b551d0f41047209ea6af15079ead34b9e735b-a
/home/travis/.cache/go-build/01/013db109ce8a3fc298a42392b90b759622f15c0007409800f456cf39371468b9-a
/home/travis/.cache/go-build/02/0252e46ea15db6752147e5d5dd5f54538b8a33a9f889db33a5622d1bf1af6860-d
/home/travis/.cache/go-build/02/027245965fb6fb7f0aaf6d2a5caf1c257ce73a4fc9cf5d9354efa2a6fca6f937-a
/home/travis/.cache/go-build/02/02f2ac89b56f43aabd6eccba59a9d46adab22bd1a9f8a8dabc64b49e73eca1f6-a
/home/travis/.cache/go-build/03/03f74aecae8a4a708784990cb757cf795045f992c3d9e0c921beb163c2cd55a1-a
/home/travis/.cache/go-build/04/04d23b63597dbd14ed3cb9aa5e2392496c219c2c47c3747b83231330f3779ea0-d
/home/travis/.cache/go-build/05/056bc9a924c03679f5b16df0f99c56ac9b1224823e0cf5dbf66068be2926b88c-a
/home/travis/.cache/go-build/05/05c4943fffc0ad621565f9f0f34b8aa7d7054f67cf56221936bf0f7fb33d39ed-a
/home/trav\n...
changes detected, packing new archive
uploading PR.282/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--go-1.14.x.tgz
cache uploaded


Done. Your build exited with 1.
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
golangci/golangci-lint info checking GitHub for tag 'v1.25.0'
golangci/golangci-lint info found version: 1.25.0 for v1.25.0/linux/amd64
golangci/golangci-lint info installed /home/travis/gopath/bin/golangci-lint
time make test
✓ Running tests...
∅  .
✓  access/acceptance (12ms)
✓  access (96ms) (coverage: 83.5% of statements)
=== RUN   TestAzureCliAuth
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:50: 
        	Error Trace:	azure_cli_auth_test.go:50
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:52: 
        	Error Trace:	azure_cli_auth_test.go:52
        	Error:      	"[]" should have 3 item(s), but has 0
        	Test:       	TestAzureCliAuth
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:55: 
        	Error Trace:	azure_cli_auth_test.go:55
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:57: 
        	Error Trace:	azure_cli_auth_test.go:57
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 0
        	Test:       	TestAzureCliAuth
        	Messages:   	There should be only one HTTP call
--- FAIL: TestAzureCliAuth (0.01s)
✖  common (56ms) (coverage: 65.5% of statements)
✓  compute/acceptance (15ms)
✓  compute (766ms) (coverage: 68.3% of statements)
✓  identity (128ms) (coverage: 42.4% of statements)
✓  identity/acceptance (19ms)
✓  internal (38ms) (coverage: 67.5% of statements)
∅  internal/acceptance
✓  internal/qa (15ms) (coverage: 54.4% of statements)
✓  internal/sanity (14ms) (coverage: 100.0% of statements)
✓  mws (1.051s) (coverage: 70.5% of statements)
✓  mws/acceptance (17ms)
=== RUN   TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin] (0.00s)
=== RUN   TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01 (0.00s)
=== RUN   TestProviderConfigurationOptions
--- FAIL: TestProviderConfigurationOptions (0.03s)
✖  provider (50ms) (coverage: 63.4% of statements)
✓  storage (510ms) (coverage: 73.5% of statements)
✓  storage/acceptance (144ms)
✓  workspace (1.069s) (coverage: 66.5% of statements)
✓  workspace/acceptance (12ms)

=== Failed
=== FAIL: common TestAzureCliAuth (0.01s)
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:50: 
        	Error Trace:	azure_cli_auth_test.go:50
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:52: 
        	Error Trace:	azure_cli_auth_test.go:52
        	Error:      	"[]" should have 3 item(s), but has 0
        	Test:       	TestAzureCliAuth
2020/08/30 15:19:21 [INFO] Using Azure CLI authentication with AAD tokens
    azure_cli_auth_test.go:55: 
        	Error Trace:	azure_cli_auth_test.go:55
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestAzureCliAuth
    azure_cli_auth_test.go:57: 
        	Error Trace:	azure_cli_auth_test.go:57
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 0
        	Test:       	TestAzureCliAuth
        	Messages:   	There should be only one HTTP call

=== FAIL: provider TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin] (0.00s)
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin] (0.00s)

=== FAIL: provider TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01 (0.00s)
2020/08/30 15:19:44 [INFO] Using Azure CLI authentication with AAD tokens
    provider_test.go:289: 
        	Error Trace:	provider_test.go:289
        	Error:      	Received unexpected error:
        	            	Error parsing Token Expiration Date "": Error parsing expiration date "".
        	            	
        	            	CloudShell Error: 
        	            	parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
        	            	
        	            	CLI Error:
        	            	parsing time "" as "2006-01-02 15:04:05.999999": cannot parse "" as "2006"
        	Test:       	TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01
    --- FAIL: TestProviderConfigurationOptions/config:map[azure_workspace_resource_id:/a/b/c_host:x]_env:map[HOME:../common/testdata_PATH:../common/testdata:/bin]#01 (0.00s)

=== FAIL: provider TestProviderConfigurationOptions (0.03s)


DONE 552 tests, 67 skipped, 4 failures in 48.480s
Makefile:14: recipe for target 'test' failed
make: *** [test] Error 1

real	0m48.486s
user	0m43.372s
sys	0m5.503s
TravisBuddy Request Identifier: 58c42f80-ead4-11ea-b2b5-f75cfe7d916f

@TravisBuddy
Copy link

Hey @nfx,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 1cb12ea0-eadc-11ea-b2b5-f75cfe7d916f

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2020

Codecov Report

Merging #282 into master will decrease coverage by 0.03%.
The diff coverage is 38.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #282      +/-   ##
==========================================
- Coverage   64.28%   64.25%   -0.04%     
==========================================
  Files          54       55       +1     
  Lines        6667     6717      +50     
==========================================
+ Hits         4286     4316      +30     
- Misses       2029     2033       +4     
- Partials      352      368      +16     
Impacted Files Coverage Δ
common/azure_auth.go 51.85% <ø> (+8.68%) ⬆️
common/azure_cli_auth.go 38.02% <38.02%> (ø)
provider/provider.go 89.29% <100.00%> (-0.57%) ⬇️

@TravisBuddy
Copy link

Hey @nfx,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 9ad22730-eadc-11ea-b2b5-f75cfe7d916f

@TravisBuddy
Copy link

Hey @nfx,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 25ec6570-eb72-11ea-95c6-05b7905ca42d

@TravisBuddy
Copy link

Hey @nfx,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 7acb4650-eb73-11ea-95c6-05b7905ca42d

@TravisBuddy
Copy link

Hey @nfx,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 1bf6bc30-eb74-11ea-95c6-05b7905ca42d

@nfx nfx merged commit 1391821 into master Aug 31, 2020
@nfx nfx deleted the fix/275 branch August 31, 2020 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ISSUE] Azure CLI token is not refreshed after 10 minute expiration
4 participants