diff --git a/workspace/converters.go b/workspace/converters.go index c128e89..b68c52b 100644 --- a/workspace/converters.go +++ b/workspace/converters.go @@ -136,6 +136,8 @@ func toWriteDatastoreSchema(datastore *Datastore) *SchemaWrapper { StorageAccountName: datastore.StorageAccountName, StorageContainerName: datastore.StorageContainerName, Credentials: credentials, + Endpoint: "core.windows.net", + Protocol: "https", }, }, } diff --git a/workspace/convertes_test.go b/workspace/convertes_test.go index bfe369a..9fce5d3 100644 --- a/workspace/convertes_test.go +++ b/workspace/convertes_test.go @@ -94,7 +94,11 @@ func TestToWriteDatastoreSchemaEmptyDatastore(t *testing.T) { a := assert.New(t) datastore := Datastore{} writeSchema := toWriteDatastoreSchema(&datastore) - a.Equal(&SchemaWrapper{WriteDatastoreSchemaProperties{Contents: WriteDatastoreSchema{}}}, writeSchema) + expected := WriteDatastoreSchemaProperties{Contents: WriteDatastoreSchema{ + Protocol: "https", + Endpoint: "core.windows.net", + }} + a.Equal(&SchemaWrapper{expected}, writeSchema) } func TestToWriteDatastoreSchema(t *testing.T) { @@ -122,6 +126,8 @@ func TestToWriteDatastoreSchema(t *testing.T) { TenantId: datastore.Auth.TenantId, SqlUserName: datastore.Auth.SqlUserName, }, + Protocol: "https", + Endpoint: "core.windows.net", }, }, } @@ -151,6 +157,8 @@ func TestToWriteDatastoreSchema_NilAuth(t *testing.T) { StorageAccountName: datastore.StorageAccountName, StorageContainerName: datastore.StorageContainerName, Credentials: nil, + Endpoint: "core.windows.net", + Protocol: "https", }, }, } diff --git a/workspace/schemas.go b/workspace/schemas.go index 8e242f9..898d91a 100644 --- a/workspace/schemas.go +++ b/workspace/schemas.go @@ -20,6 +20,8 @@ type WriteDatastoreSchema struct { StorageAccountName string `json:"accountName,omitempty"` StorageContainerName string `json:"containerName,omitempty"` Credentials *WriteDatastoreCredentialsSchema `json:"credentials,omitempty"` + Endpoint string `json:"endpoint"` + Protocol string `json:"protocol"` } type WriteDatastoreSchemaProperties struct {