From d2e16fc74add3e1514444c3f140dc3df4797f647 Mon Sep 17 00:00:00 2001 From: Flavian Missi Date: Tue, 30 May 2023 09:23:17 +0200 Subject: [PATCH] registry/storage/driver/azure: fix driver parameters on tests fixes "azure: no Host in request URL" tests failure, allowing azure driver tests to run. Signed-off-by: Flavian Missi --- registry/storage/driver/azure/azure_test.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/registry/storage/driver/azure/azure_test.go b/registry/storage/driver/azure/azure_test.go index 5b0b95335..42a8a9b47 100644 --- a/registry/storage/driver/azure/azure_test.go +++ b/registry/storage/driver/azure/azure_test.go @@ -52,14 +52,18 @@ func init() { } azureDriverConstructor := func() (storagedriver.StorageDriver, error) { - params := Parameters{ - Container: container, - AccountName: accountName, - AccountKey: accountKey, - Realm: realm, - RootDirectory: rootDirectory, + parameters := map[string]interface{}{ + "container": container, + "accountname": accountName, + "accountkey": accountKey, + "realm": realm, + "rootdirectory": rootDirectory, } - return New(¶ms) + params, err := NewParameters(parameters) + if err != nil { + return nil, err + } + return New(params) } // Skip Azure storage driver tests if environment variable parameters are not provided