diff --git a/cmd/copy.go b/cmd/copy.go index c7a87d54d..194e2174e 100644 --- a/cmd/copy.go +++ b/cmd/copy.go @@ -279,6 +279,11 @@ func (raw rawCopyCmdArgs) cook() (CookedCopyCmdArgs, error) { azcopyScanningLogger.CloseLog() }) + // if no logging, set this empty so that we don't display the log location + if azcopyLogVerbosity == common.LogNone { + azcopyLogPathFolder = "" + } + fromTo, err := ValidateFromTo(raw.src, raw.dst, raw.fromTo) // TODO: src/dst if err != nil { return cooked, err @@ -549,7 +554,7 @@ func (raw rawCopyCmdArgs) cook() (CookedCopyCmdArgs, error) { } if cooked.FromTo.To() == common.ELocation.None() && strings.EqualFold(raw.metadata, common.MetadataAndBlobTagsClearFlag) { // in case of Blob, BlobFS and Files - glcm.Info("*** WARNING *** Metadata will be cleared because of input --metadata=clear ") + glcm.Warn("*** WARNING *** Metadata will be cleared because of input --metadata=clear ") } cooked.metadata = raw.metadata if err = validateMetadataString(cooked.metadata); err != nil { @@ -573,7 +578,7 @@ func (raw rawCopyCmdArgs) cook() (CookedCopyCmdArgs, error) { return cooked, errors.New("blob tags can only be set when transferring to blob storage") } if cooked.FromTo.To() == common.ELocation.None() && strings.EqualFold(raw.blobTags, common.MetadataAndBlobTagsClearFlag) { // in case of Blob and BlobFS - glcm.Info("*** WARNING *** BlobTags will be cleared because of input --blob-tags=clear ") + glcm.Warn("*** WARNING *** BlobTags will be cleared because of input --blob-tags=clear ") } blobTags := common.ToCommonBlobTagsMap(raw.blobTags) err = validateBlobTagsKeyValue(blobTags) @@ -901,7 +906,7 @@ var includeWarningOncer = &sync.Once{} func (raw *rawCopyCmdArgs) warnIfHasWildcard(oncer *sync.Once, paramName string, value string) { if strings.Contains(value, "*") || strings.Contains(value, "?") { oncer.Do(func() { - glcm.Info(fmt.Sprintf("*** Warning *** The %s parameter does not support wildcards. The wildcard "+ + glcm.Warn(fmt.Sprintf("*** Warning *** The %s parameter does not support wildcards. The wildcard "+ "character provided will be interpreted literally and will not have any wildcard effect. To use wildcards "+ "(in filenames only, not paths) use include-pattern or exclude-pattern", paramName)) }) @@ -1689,11 +1694,13 @@ func (cca *CookedCopyCmdArgs) waitUntilJobCompletion(blocking bool) { // print initial message to indicate that the job is starting // if on dry run mode do not want to print message since no job is being done if !cca.dryrunMode { + // Output the log location if log-level is set to other then NONE + var logPathFolder string + if azcopyLogPathFolder != "" { + logPathFolder = fmt.Sprintf("%s%s%s.log", azcopyLogPathFolder, common.OS_PATH_SEPARATOR, cca.jobID) + } glcm.Init(common.GetStandardInitOutputBuilder(cca.jobID.String(), - fmt.Sprintf("%s%s%s.log", - azcopyLogPathFolder, - common.OS_PATH_SEPARATOR, - cca.jobID), + logPathFolder, cca.isCleanupJob, cca.cleanupJobMessage)) } diff --git a/cmd/copyEnumeratorHelper.go b/cmd/copyEnumeratorHelper.go index acf70dffd..0dbb1ec2f 100644 --- a/cmd/copyEnumeratorHelper.go +++ b/cmd/copyEnumeratorHelper.go @@ -2,9 +2,10 @@ package cmd import ( "fmt" + "math/rand" + "github.com/Azure/azure-storage-azcopy/v10/common" "github.com/Azure/azure-storage-azcopy/v10/jobsAdmin" - "math/rand" ) var EnumerationParallelism = 1 @@ -12,7 +13,7 @@ var EnumerationParallelStatFiles = false // addTransfer accepts a new transfer, if the threshold is reached, dispatch a job part order. func addTransfer(e *common.CopyJobPartOrderRequest, transfer common.CopyTransfer, cca *CookedCopyCmdArgs) error { - // Source and destination paths are and should be relative paths. + // Source and destination paths are and should be relative paths. // dispatch the transfers once the number reaches NumOfFilesPerDispatchJobPart // we do this so that in the case of large transfer, the transfer engine can get started @@ -69,8 +70,12 @@ func dispatchFinalPart(e *common.CopyJobPartOrderRequest, cca *CookedCopyCmdArgs Rpc(common.ERpcCmd.CopyJobPartOrder(), (*common.CopyJobPartOrderRequest)(e), &resp) if !resp.JobStarted { - // Output the log location and such - glcm.Init(common.GetStandardInitOutputBuilder(cca.jobID.String(), fmt.Sprintf("%s%s%s.log", azcopyLogPathFolder, common.OS_PATH_SEPARATOR, cca.jobID), cca.isCleanupJob, cca.cleanupJobMessage)) + // Output the log location if log-level is set to other then NONE + var logPathFolder string + if azcopyLogPathFolder != "" { + logPathFolder = fmt.Sprintf("%s%s%s.log", azcopyLogPathFolder, common.OS_PATH_SEPARATOR, cca.jobID) + } + glcm.Init(common.GetStandardInitOutputBuilder(cca.jobID.String(), logPathFolder, cca.isCleanupJob, cca.cleanupJobMessage)) if cca.dryrunMode { return nil diff --git a/cmd/copyEnumeratorInit.go b/cmd/copyEnumeratorInit.go index 73c537a34..b81ec6b90 100755 --- a/cmd/copyEnumeratorInit.go +++ b/cmd/copyEnumeratorInit.go @@ -157,7 +157,7 @@ func (cca *CookedCopyCmdArgs) initEnumerator(jobPartOrder common.CopyJobPartOrde // check against seenFailedContainers so we don't spam the job log with initialization failed errors if _, ok := seenFailedContainers[dstContainerName]; err != nil && jobsAdmin.JobsAdmin != nil && !ok { logDstContainerCreateFailureOnce.Do(func() { - glcm.Info("Failed to create one or more destination container(s). Your transfers may still succeed if the container already exists.") + glcm.Warn("Failed to create one or more destination container(s). Your transfers may still succeed if the container already exists.") }) jobsAdmin.JobsAdmin.LogToJobLog(fmt.Sprintf("Failed to create destination container %s. The transfer will continue if the container exists", dstContainerName), common.LogWarning) jobsAdmin.JobsAdmin.LogToJobLog(fmt.Sprintf("Error %s", err), common.LogDebug) @@ -194,7 +194,7 @@ func (cca *CookedCopyCmdArgs) initEnumerator(jobPartOrder common.CopyJobPartOrde // check against seenFailedContainers so we don't spam the job log with initialization failed errors if _, ok := seenFailedContainers[bucketName]; err != nil && jobsAdmin.JobsAdmin != nil && !ok { logDstContainerCreateFailureOnce.Do(func() { - glcm.Info("Failed to create one or more destination container(s). Your transfers may still succeed if the container already exists.") + glcm.Warn("Failed to create one or more destination container(s). Your transfers may still succeed if the container already exists.") }) jobsAdmin.JobsAdmin.LogToJobLog(fmt.Sprintf("failed to initialize destination container %s; the transfer will continue (but be wary it may fail).", bucketName), common.LogWarning) jobsAdmin.JobsAdmin.LogToJobLog(fmt.Sprintf("Error %s", err), common.LogDebug) @@ -215,7 +215,7 @@ func (cca *CookedCopyCmdArgs) initEnumerator(jobPartOrder common.CopyJobPartOrde if _, ok := seenFailedContainers[dstContainerName]; err != nil && jobsAdmin.JobsAdmin != nil && !ok { logDstContainerCreateFailureOnce.Do(func() { - glcm.Info("Failed to create one or more destination container(s). Your transfers may still succeed if the container already exists.") + glcm.Warn("Failed to create one or more destination container(s). Your transfers may still succeed if the container already exists.") }) jobsAdmin.JobsAdmin.LogToJobLog(fmt.Sprintf("failed to initialize destination container %s; the transfer will continue (but be wary it may fail).", resName), common.LogWarning) jobsAdmin.JobsAdmin.LogToJobLog(fmt.Sprintf("Error %s", err), common.LogDebug) diff --git a/cmd/jobsResume.go b/cmd/jobsResume.go index 053e6e319..b02f57f9f 100644 --- a/cmd/jobsResume.go +++ b/cmd/jobsResume.go @@ -59,7 +59,12 @@ type resumeJobController struct { // if blocking is specified to false, then another goroutine spawns and wait out the job func (cca *resumeJobController) waitUntilJobCompletion(blocking bool) { // print initial message to indicate that the job is starting - glcm.Init(common.GetStandardInitOutputBuilder(cca.jobID.String(), fmt.Sprintf("%s%s%s.log", azcopyLogPathFolder, common.OS_PATH_SEPARATOR, cca.jobID), false, "")) + // Output the log location if log-level is set to other then NONE + var logPathFolder string + if azcopyLogPathFolder != "" { + logPathFolder = fmt.Sprintf("%s%s%s.log", azcopyLogPathFolder, common.OS_PATH_SEPARATOR, cca.jobID) + } + glcm.Init(common.GetStandardInitOutputBuilder(cca.jobID.String(), logPathFolder, false, "")) // initialize the times necessary to track progress cca.jobStartTime = time.Now() @@ -324,6 +329,11 @@ func (rca resumeCmdArgs) process() error { return fmt.Errorf("error parsing the jobId %s. Failed with error %s", rca.jobID, err.Error()) } + // if no logging, set this empty so that we don't display the log location + if azcopyLogVerbosity == common.LogNone { + azcopyLogPathFolder = "" + } + includeTransfer := make(map[string]int) excludeTransfer := make(map[string]int) diff --git a/cmd/root.go b/cmd/root.go index 2b53212c1..3ac42dac7 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -254,7 +254,7 @@ func init() { rootCmd.PersistentFlags().Float64Var(&cmdLineCapMegaBitsPerSecond, "cap-mbps", 0, "Caps the transfer rate, in megabits per second. Moment-by-moment throughput might vary slightly from the cap. If this option is set to zero, or it is omitted, the throughput isn't capped.") rootCmd.PersistentFlags().StringVar(&outputFormatRaw, "output-type", "text", "Format of the command's output. The choices include: text, json. The default value is 'text'.") rootCmd.PersistentFlags().StringVar(&outputVerbosityRaw, "output-level", "default", "Define the output verbosity. Available levels: essential, quiet.") - rootCmd.PersistentFlags().StringVar(&logVerbosityRaw, "log-level", "INFO", "Define the log verbosity for the log file, available levels: INFO(all requests/responses), WARNING(slow responses), ERROR(only failed requests), and NONE(no output logs). (default 'INFO').") + rootCmd.PersistentFlags().StringVar(&logVerbosityRaw, "log-level", "INFO", "Define the log verbosity for the log file, available levels: DEBUG(detailed trace), INFO(all requests/responses), WARNING(slow responses), ERROR(only failed requests), and NONE(no output logs). (default 'INFO').") rootCmd.PersistentFlags().StringVar(&cmdLineExtraSuffixesAAD, trustedSuffixesNameAAD, "", "Specifies additional domain suffixes where Azure Active Directory login tokens may be sent. The default is '"+ trustedSuffixesAAD+"'. Any listed here are added to the default. For security, you should only put Microsoft Azure domains here. Separate multiple entries with semi-colons.") diff --git a/cmd/sync.go b/cmd/sync.go index 1a88d8d27..f4fb206b0 100644 --- a/cmd/sync.go +++ b/cmd/sync.go @@ -140,6 +140,11 @@ func (raw *rawSyncCmdArgs) cook() (cookedSyncCmdArgs, error) { azcopyScanningLogger.CloseLog() }) + // if no logging, set this empty so that we don't display the log location + if azcopyLogVerbosity == common.LogNone { + azcopyLogPathFolder = "" + } + // this if statement ladder remains instead of being separated to help determine valid combinations for sync // consider making a map of valid source/dest combos and consolidating this to generic source/dest setups, akin to the lower if statement // TODO: if expand the set of source/dest combos supported by sync, update this method the declarative test framework: @@ -505,7 +510,12 @@ func (cca *cookedSyncCmdArgs) scanningComplete() bool { // if blocking is specified to false, then another goroutine spawns and wait out the job func (cca *cookedSyncCmdArgs) waitUntilJobCompletion(blocking bool) { // print initial message to indicate that the job is starting - glcm.Init(common.GetStandardInitOutputBuilder(cca.jobID.String(), fmt.Sprintf("%s%s%s.log", azcopyLogPathFolder, common.OS_PATH_SEPARATOR, cca.jobID), false, "")) + // Output the log location if log-level is set to other then NONE + var logPathFolder string + if azcopyLogPathFolder != "" { + logPathFolder = fmt.Sprintf("%s%s%s.log", azcopyLogPathFolder, common.OS_PATH_SEPARATOR, cca.jobID) + } + glcm.Init(common.GetStandardInitOutputBuilder(cca.jobID.String(), logPathFolder, false, "")) // initialize the times necessary to track progress cca.jobStartTime = time.Now() diff --git a/common/output.go b/common/output.go index 910f169a5..fdb2f4abb 100644 --- a/common/output.go +++ b/common/output.go @@ -118,7 +118,9 @@ func GetStandardInitOutputBuilder(jobID string, logFileLocation string, isCleanu sb.WriteString(cleanupHeader) } else { sb.WriteString("\nJob " + jobID + " has started\n") - sb.WriteString("Log file is located at: " + logFileLocation) + if logFileLocation != "" { + sb.WriteString("Log file is located at: " + logFileLocation) + } sb.WriteString("\n") } return sb.String() diff --git a/e2etest/newe2e_task_validation.go b/e2etest/newe2e_task_validation.go index 70159c2f4..18f88d1fd 100644 --- a/e2etest/newe2e_task_validation.go +++ b/e2etest/newe2e_task_validation.go @@ -175,15 +175,20 @@ func ValidateListOutput(a Asserter, stdout AzCopyStdout, expectedObjects map[AzC a.Assert("summary must match", Equal{}, listStdout.Summary, DerefOrZero(expectedSummary)) } -func ValidateMessageOutput(a Asserter, stdout AzCopyStdout, message string) { +func ValidateMessageOutput(a Asserter, stdout AzCopyStdout, message string, shouldContain bool) { if dryrunner, ok := a.(DryrunAsserter); ok && dryrunner.Dryrun() { return } + var contains bool for _, line := range stdout.RawStdout() { if strings.Contains(line, message) { - return + contains = true + break } } + if (!contains && !shouldContain) || (contains && shouldContain) { + return + } fmt.Println(stdout.String()) a.Error(fmt.Sprintf("expected message (%s) not found in azcopy output", message)) } diff --git a/e2etest/zt_azcopy_flags_test.go b/e2etest/zt_azcopy_flags_test.go new file mode 100644 index 000000000..d60268c52 --- /dev/null +++ b/e2etest/zt_azcopy_flags_test.go @@ -0,0 +1,94 @@ +// Copyright © Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package e2etest + +import ( + "fmt" + "time" + + "github.com/Azure/azure-storage-azcopy/v10/common" +) + +func init() { + suiteManager.RegisterSuite(&FlagsFunctionalitySuite{}) +} + +type FlagsFunctionalitySuite struct{} + +// @brief This test verifies that when the --log-level is set to NONE, +// AzCopy does not display the "Log files located" message on the console. +func (s *FlagsFunctionalitySuite) Scenario_LogLevelNone(svm *ScenarioVariationManager) { + azCopyVerb := ResolveVariation(svm, []AzCopyVerb{AzCopyVerbCopy, AzCopyVerbSync}) // Calculate verb early to create the destination object early + // Scale up from service to object + dstObj := CreateResource[ContainerResourceManager](svm, GetRootResource(svm, ResolveVariation(svm, []common.Location{common.ELocation.Local(), common.ELocation.Blob(), common.ELocation.File(), common.ELocation.BlobFS()})), ResourceDefinitionContainer{}).GetObject(svm, "test", common.EEntityType.File()) + + // The object must exist already if we're syncing. + if azCopyVerb == AzCopyVerbSync { + dstObj.Create(svm, NewZeroObjectContentContainer(0), ObjectProperties{}) + + if !svm.Dryrun() { + // Make sure the LMT is in the past + time.Sleep(time.Second * 10) + } + } + + body := NewRandomObjectContentContainer(SizeFromString("10K")) + // Scale up from service to object + srcObj := CreateResource[ObjectResourceManager](svm, GetRootResource(svm, ResolveVariation(svm, []common.Location{common.ELocation.Local(), common.ELocation.Blob(), common.ELocation.File(), common.ELocation.BlobFS()})), ResourceDefinitionObject{ + ObjectName: pointerTo("test"), + Body: body, + }) + + // no local->local + if srcObj.Location().IsLocal() && dstObj.Location().IsLocal() { + svm.InvalidateScenario() + return + } + + sasOpts := GenericAccountSignatureValues{} + logLevel := common.LogLevel.None(common.LogNone) + + stdOut, _ := RunAzCopy( + svm, + AzCopyCommand{ + Verb: azCopyVerb, + Targets: []ResourceManager{ + TryApplySpecificAuthType(srcObj, EExplicitCredentialType.SASToken(), svm, CreateAzCopyTargetOptions{ + SASTokenOptions: sasOpts, + }), + TryApplySpecificAuthType(dstObj, EExplicitCredentialType.SASToken(), svm, CreateAzCopyTargetOptions{ + SASTokenOptions: sasOpts, + }), + }, + Flags: CopyFlags{ + CopySyncCommonFlags: CopySyncCommonFlags{ + Recursive: pointerTo(true), + GlobalFlags: GlobalFlags{ + LogLevel: &logLevel, + }, + }, + }, + }) + + fmt.Println("================================================================") + fmt.Println(stdOut) + ValidateMessageOutput(svm, stdOut, "LogFileLocation", false) +} diff --git a/e2etest/zt_newe2e_basic_functionality_test.go b/e2etest/zt_newe2e_basic_functionality_test.go index bbd46818f..652f406d3 100644 --- a/e2etest/zt_newe2e_basic_functionality_test.go +++ b/e2etest/zt_newe2e_basic_functionality_test.go @@ -1,10 +1,11 @@ package e2etest import ( - blobsas "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas" - "github.com/Azure/azure-storage-azcopy/v10/common" "strconv" "time" + + blobsas "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas" + "github.com/Azure/azure-storage-azcopy/v10/common" ) func init() { @@ -346,7 +347,7 @@ func (s *BasicFunctionalitySuite) Scenario_SingleFileUploadDownload_EmptySAS(svm }) // Validate that the stdout contains the missing sas message - ValidateMessageOutput(svm, stdout, "Please authenticate using Microsoft Entra ID (https://aka.ms/AzCopy/AuthZ), use AzCopy login, or append a SAS token to your Azure URL.") + ValidateMessageOutput(svm, stdout, "Please authenticate using Microsoft Entra ID (https://aka.ms/AzCopy/AuthZ), use AzCopy login, or append a SAS token to your Azure URL.", true) } func (s *BasicFunctionalitySuite) Scenario_Sync_EmptySASErrorCodes(svm *ScenarioVariationManager) { @@ -482,5 +483,5 @@ func (s *BasicFunctionalitySuite) Scenario_TagsPermission(svm *ScenarioVariation }, ) - ValidateMessageOutput(svm, stdOut, "Authorization failed during an attempt to set tags, please ensure you have the appropriate Tags permission") + ValidateMessageOutput(svm, stdOut, "Authorization failed during an attempt to set tags, please ensure you have the appropriate Tags permission", true) } diff --git a/e2etest/zt_newe2e_file_oauth_test.go b/e2etest/zt_newe2e_file_oauth_test.go index 828cc20d5..04c6b5612 100644 --- a/e2etest/zt_newe2e_file_oauth_test.go +++ b/e2etest/zt_newe2e_file_oauth_test.go @@ -2,6 +2,7 @@ package e2etest import ( "fmt" + "github.com/Azure/azure-storage-azcopy/v10/common" ) @@ -35,5 +36,5 @@ func (s *FileOAuthTestSuite) Scenario_FileBlobOAuthError(svm *ScenarioVariationM ShouldFail: true, }) - ValidateMessageOutput(svm, stdout, fmt.Sprintf("S2S %s from Azure File authenticated with Azure AD to Blob/BlobFS is not supported", azCopyVerb)) + ValidateMessageOutput(svm, stdout, fmt.Sprintf("S2S %s from Azure File authenticated with Azure AD to Blob/BlobFS is not supported", azCopyVerb), true) } diff --git a/e2etest/zt_newe2e_jobs_clean_test.go b/e2etest/zt_newe2e_jobs_clean_test.go index 506c036fc..a167f8159 100644 --- a/e2etest/zt_newe2e_jobs_clean_test.go +++ b/e2etest/zt_newe2e_jobs_clean_test.go @@ -43,5 +43,5 @@ func (s *JobsCleanSuite) Scenario_JobsCleanBasic(svm *ScenarioVariationManager) }, }) - ValidateMessageOutput(svm, jobsCleanOutput, cmd.JobsCleanupSuccessMsg) + ValidateMessageOutput(svm, jobsCleanOutput, cmd.JobsCleanupSuccessMsg, true) } diff --git a/e2etest/zt_newe2e_list_test.go b/e2etest/zt_newe2e_list_test.go index 3686b50d3..46237909d 100644 --- a/e2etest/zt_newe2e_list_test.go +++ b/e2etest/zt_newe2e_list_test.go @@ -1,11 +1,12 @@ package e2etest import ( + "strings" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" blobsas "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas" "github.com/Azure/azure-storage-azcopy/v10/cmd" "github.com/Azure/azure-storage-azcopy/v10/common" - "strings" ) func init() { @@ -820,7 +821,7 @@ func (s *ListSuite) Scenario_EmptySASErrorCodes(svm *ScenarioVariationManager) { }) // Validate that the stdout contains these error URLs - ValidateMessageOutput(svm, stdout, "https://aka.ms/AzCopyError/NoAuthenticationInformation") + ValidateMessageOutput(svm, stdout, "https://aka.ms/AzCopyError/NoAuthenticationInformation", true) } func (s *ListSuite) Scenario_VirtualDirectoryHandling(svm *ScenarioVariationManager) { diff --git a/e2etest/zt_newe2e_oauth_device_test.go b/e2etest/zt_newe2e_oauth_device_test.go index 7eb1fad75..7a72df3dd 100644 --- a/e2etest/zt_newe2e_oauth_device_test.go +++ b/e2etest/zt_newe2e_oauth_device_test.go @@ -2,11 +2,12 @@ package e2etest import ( "flag" - "github.com/Azure/azure-storage-azcopy/v10/common" - "github.com/Azure/azure-storage-azcopy/v10/testSuite/cmd" "path" "strings" "time" + + "github.com/Azure/azure-storage-azcopy/v10/common" + "github.com/Azure/azure-storage-azcopy/v10/testSuite/cmd" ) var runDeviceCodeTest = flag.Bool("device-code", false, "Whether or not to run device code tests. These must be run manually due to interactive nature.") @@ -94,9 +95,9 @@ func (s *DeviceLoginManualSuite) Scenario_CopySync(svm *ScenarioVariationManager }, true) if srcObj.Location().IsRemote() { - ValidateMessageOutput(svm, stdout, "Authenticating to source using Azure AD") + ValidateMessageOutput(svm, stdout, "Authenticating to source using Azure AD", true) } if dstObj.Location().IsRemote() { - ValidateMessageOutput(svm, stdout, "Authenticating to destination using Azure AD") + ValidateMessageOutput(svm, stdout, "Authenticating to destination using Azure AD", true) } } diff --git a/e2etest/zt_newe2e_remove_test.go b/e2etest/zt_newe2e_remove_test.go index 80e5e780b..f41052aef 100644 --- a/e2etest/zt_newe2e_remove_test.go +++ b/e2etest/zt_newe2e_remove_test.go @@ -1,10 +1,11 @@ package e2etest import ( + "strconv" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" blobsas "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas" "github.com/Azure/azure-storage-azcopy/v10/common" - "strconv" ) func init() { @@ -70,7 +71,7 @@ func (s *RemoveSuite) Scenario_EmptySASErrorCodes(svm *ScenarioVariationManager) }) // Validate that the stdout contains these error URLs - ValidateMessageOutput(svm, stdout, "https://aka.ms/AzCopyError/NoAuthenticationInformation") + ValidateMessageOutput(svm, stdout, "https://aka.ms/AzCopyError/NoAuthenticationInformation", true) } func (s *RemoveSuite) Scenario_RemoveVirtualDirectory(svm *ScenarioVariationManager) { diff --git a/e2etest/zt_sync_local_file_test.go b/e2etest/zt_sync_local_file_test.go index 0d04ef06a..ef6522ee2 100644 --- a/e2etest/zt_sync_local_file_test.go +++ b/e2etest/zt_sync_local_file_test.go @@ -32,5 +32,5 @@ func (s *FileOAuthTestSuite) Scenario_SyncFromLocalToFSWarningMsg(svm *ScenarioV ShouldFail: false, }) - ValidateMessageOutput(svm, stdout, cmd.LocalToFileShareWarnMsg) + ValidateMessageOutput(svm, stdout, cmd.LocalToFileShareWarnMsg, true) }