-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azcopy sync option for file share is not supported (#2676)
* Azcopy sync option for file share is not supported * Added e2e test * corrected the failed test case due to code changes * updated e2e test * restored the original changes for unchanged files --------- Co-authored-by: Gauri Lamunion <[email protected]>
- Loading branch information
1 parent
a2521ad
commit bc87edc
Showing
3 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package e2etest | ||
|
||
import ( | ||
"github.com/Azure/azure-storage-azcopy/v10/cmd" | ||
"github.com/Azure/azure-storage-azcopy/v10/common" | ||
) | ||
|
||
// @brief This scenario performs sync operation from local to file share. | ||
// @validation This test verifies if the warning message is displayed on console if the | ||
// user tries to perform sync operation from local to file share. | ||
func (s *FileOAuthTestSuite) Scenario_SyncFromLocalToFSWarningMsg(svm *ScenarioVariationManager) { | ||
azCopyVerb := ResolveVariation(svm, []AzCopyVerb{AzCopyVerbSync}) // Calculate verb early to create the destination object early | ||
|
||
srcContainer := CreateResource[ContainerResourceManager](svm, GetRootResource(svm, common.ELocation.Local()), ResourceDefinitionContainer{}) | ||
dstContainer := CreateResource[ContainerResourceManager](svm, GetRootResource(svm, common.ELocation.File()), ResourceDefinitionContainer{}) | ||
|
||
dstAuth := ResolveVariation(svm, []ExplicitCredentialTypes{EExplicitCredentialType.SASToken(), EExplicitCredentialType.OAuth()}) | ||
|
||
stdout, _ := RunAzCopy( | ||
svm, | ||
AzCopyCommand{ | ||
Verb: azCopyVerb, | ||
Targets: []ResourceManager{ | ||
TryApplySpecificAuthType(srcContainer, EExplicitCredentialType.OAuth(), svm, CreateAzCopyTargetOptions{}), | ||
TryApplySpecificAuthType(dstContainer, dstAuth, svm, CreateAzCopyTargetOptions{}), | ||
}, | ||
Flags: CopyFlags{ | ||
CopySyncCommonFlags: CopySyncCommonFlags{ | ||
Recursive: pointerTo(true), | ||
}, | ||
}, | ||
ShouldFail: false, | ||
}) | ||
|
||
ValidateErrorOutput(svm, stdout, cmd.LocalToFileShareWarnMsg) | ||
} |