Fix volume creation and deletion of Azure File tests

This commit is contained in:
Fabio Bertinatto
2022-03-23 09:34:06 -03:00
parent b5cff9219d
commit dafa0e178d
6 changed files with 42 additions and 20 deletions

View File

@@ -93,8 +93,8 @@ func (p *Provider) DeleteNode(node *v1.Node) error {
return err
}
func (p *Provider) CreateShare() (string, string, error) {
return "", "", nil
func (p *Provider) CreateShare() (string, string, string, error) {
return "", "", "", nil
}
func (p *Provider) DeleteShare(accountName, shareName string) error {

View File

@@ -86,7 +86,7 @@ func (p *Provider) CreatePD(zone string) (string, error) {
}
// CreateShare creates a share and return its account name and key.
func (p *Provider) CreateShare() (string, string, error) {
func (p *Provider) CreateShare() (string, string, string, error) {
accountOptions := &azure.AccountOptions{
Name: "",
Type: string(compute.StandardLRS),
@@ -102,13 +102,16 @@ func (p *Provider) CreateShare() (string, string, error) {
RequestGiB: 1,
}
a, b, c := p.azureCloud.CreateFileShare(accountOptions, shareOptions)
accountName, accountKey, err := p.azureCloud.CreateFileShare(accountOptions, shareOptions)
if err != nil {
return "", "", "", err
}
return a, b, c
return accountName, accountKey, shareOptions.Name, nil
}
func (p *Provider) DeleteShare(accountName, shareName string) error {
err := p.azureCloud.DeleteFileShare("", accountName, shareName)
err := p.azureCloud.DeleteFileShare(p.azureCloud.ResourceGroup, accountName, shareName)
if err != nil {
framework.Logf("failed to delete Azure File share %q: %v", shareName, err)
}

View File

@@ -225,8 +225,8 @@ func (p *Provider) DeleteNode(node *v1.Node) error {
return p.gceCloud.DeleteInstance(project, zone, node.Name)
}
func (p *Provider) CreateShare() (string, string, error) {
return "", "", nil
func (p *Provider) CreateShare() (string, string, string, error) {
return "", "", "", nil
}
func (p *Provider) DeleteShare(accountName, shareName string) error {