func (s *cmdIntegrationSuite) TestSyncS2SWithExcludeFlag(c *chk.C) {
	bsu := getBSU()
	srcContainerURL, srcContainerName := createNewContainer(c, bsu)
	dstContainerURL, dstContainerName := createNewContainer(c, bsu)
	defer deleteContainer(c, srcContainerURL)
	defer deleteContainer(c, dstContainerURL)

	// set up the source container with numerous blobs
	blobList := scenarioHelper{}.generateCommonRemoteScenarioForBlob(c, srcContainerURL, "")
	c.Assert(len(blobList), chk.Not(chk.Equals), 0)

	// add special blobs that we wish to exclude
	blobsToExclude := []string{"notGood.pdf", "excludeSub/lame.jpeg", "exactName"}
	scenarioHelper{}.generateBlobsFromList(c, srcContainerURL, blobsToExclude, blockBlobDefaultData)
	excludeString := "*.pdf;*.jpeg;exactName"

	// set up interceptor
	mockedRPC := interceptor{}
	Rpc = mockedRPC.intercept
	mockedRPC.init()

	// construct the raw input to simulate user input
	srcContainerURLWithSAS := scenarioHelper{}.getRawContainerURLWithSAS(c, srcContainerName)
	dstContainerURLWithSAS := scenarioHelper{}.getRawContainerURLWithSAS(c, dstContainerName)
	raw := getDefaultSyncRawInput(srcContainerURLWithSAS.String(), dstContainerURLWithSAS.String())
	raw.exclude = excludeString

	// make sure the list doesn't include the blobs specified by the exclude flag
	runSyncAndVerify(c, raw, func(err error) {
		c.Assert(err, chk.IsNil)
		validateS2SSyncTransfersAreScheduled(c, "", "", blobList, mockedRPC)
	})
}
// exclude flag limits the scope of source/destination comparison
exclude flag limits the scope of source/destination comparison
// exclude flag limits the scope of source / destination comparison
func (s *cmdIntegrationSuite) TestSyncS2SWithExcludeFlag(c *chk.C) {
	bsu := getBSU()
	srcContainerURL, srcContainerName := createNewContainer(c, bsu)
	dstContainerURL, dstContainerName := createNewContainer(c, bsu)
	defer deleteContainer(c, srcContainerURL)
	defer deleteContainer(c, dstContainerURL)
	blobList := scenarioHelper{}.generateCommonRemoteScenarioForBlob(c, srcContainerURL, "")
	c.Assert(len(blobList), chk.Not(chk.Equals), 0)
	blobsToExclude := []string{"notGood.pdf", "excludeSub/lame.jpeg", "exactName"}
	scenarioHelper{}.generateBlobsFromList(c, srcContainerURL, blobsToExclude, blockBlobDefaultData)
	excludeString := "*.pdf;*.jpeg;exactName"
	mockedRPC := interceptor{}
	Rpc = mockedRPC.intercept
	mockedRPC.init()
	srcContainerURLWithSAS := scenarioHelper{}.getRawContainerURLWithSAS(c, srcContainerName)
	dstContainerURLWithSAS := scenarioHelper{}.getRawContainerURLWithSAS(c, dstContainerName)
	raw := getDefaultSyncRawInput(srcContainerURLWithSAS.String(), dstContainerURLWithSAS.String())
	raw.exclude = excludeString
	runSyncAndVerify(c, raw, func(err error) {
		c.Assert(err, chk.IsNil)
		validateS2SSyncTransfersAreScheduled(c, "", "", blobList, mockedRPC)
	})
}
func ( s * cmdIntegrationSuite ) TestSyncS2SWithExcludeFlag ( c * chk . C ) { bsu := getBSU ( ) srcContainerURL , srcContainerName := createNewContainer ( c , bsu ) dstContainerURL , dstContainerName := createNewContainer ( c , bsu ) defer deleteContainer ( c , srcContainerURL ) defer deleteContainer ( c , dstContainerURL ) blobList := scenarioHelper { } . generateCommonRemoteScenarioForBlob ( c , srcContainerURL , " " ) c . Assert ( len ( blobList ) , chk . Not ( chk . Equals ) , 0 ) blobsToExclude := [ ] string { " " , " " , " " } scenarioHelper { } . generateBlobsFromList ( c , srcContainerURL , blobsToExclude , blockBlobDefaultData ) excludeString := " " mockedRPC := interceptor { } Rpc = mockedRPC . intercept mockedRPC . init ( ) srcContainerURLWithSAS := scenarioHelper { } . getRawContainerURLWithSAS ( c , srcContainerName ) dstContainerURLWithSAS := scenarioHelper { } . getRawContainerURLWithSAS ( c , dstContainerName ) raw := getDefaultSyncRawInput ( srcContainerURLWithSAS . String ( ) , dstContainerURLWithSAS . String ( ) ) raw . exclude = excludeString runSyncAndVerify ( c , raw , func ( err error ) { c . Assert ( err , chk . IsNil ) validateS2SSyncTransfersAreScheduled ( c , " " , " " , blobList , mockedRPC ) } ) }
exclude flag limits the scope of source/destination comparison
exclude flag limits the scope of source / destination comparison
// set up the source container with numerous blobs // add special blobs that we wish to exclude // set up interceptor // construct the raw input to simulate user input // make sure the list doesn't include the blobs specified by the exclude flag