@@ -3267,6 +3267,39 @@ func TestArtifactoryDownloadByShaAndBuild(t *testing.T) {
32673267 cleanArtifactoryTest ()
32683268}
32693269
3270+ func TestArtifactoryUploadWithBuildNameWithSpaces (t * testing.T ) {
3271+ initArtifactoryTest (t , "" )
3272+
3273+ buildNumber := "1"
3274+
3275+ // Delete the build if it already exists
3276+ inttestutils .DeleteBuild (serverDetails .ArtifactoryUrl , tests .RtBuildNameWithSpaces , artHttpDetails )
3277+
3278+ // Upload a file with build name containing spaces
3279+ runRt (t , "upload" , "testdata/a/a1.in" , tests .RtRepo1 + "/data/a1.in" ,
3280+ "--build-name=" + tests .RtBuildNameWithSpaces , "--build-number=" + buildNumber )
3281+
3282+ // Publish build info
3283+ runRt (t , "build-publish" , tests .RtBuildNameWithSpaces , buildNumber )
3284+
3285+ // Validate that the file was uploaded successfully
3286+ specFile , err := tests .CreateSpec (tests .BuildDownloadSpecNoBuildNumber )
3287+ assert .NoError (t , err )
3288+
3289+ runRt (t , "download" , "--spec=" + specFile )
3290+
3291+ // Validate downloaded files
3292+ paths , err := fileutils .ListFilesRecursiveWalkIntoDirSymlink (tests .Out , false )
3293+ assert .NoError (t , err )
3294+ err = tests .ValidateListsIdentical (tests .GetBuildDownload (), paths )
3295+ assert .NoError (t , err )
3296+
3297+ // Cleanup
3298+ inttestutils .DeleteBuild (serverDetails .ArtifactoryUrl , tests .RtBuildNameWithSpaces , artHttpDetails )
3299+ cleanArtifactoryTest ()
3300+ }
3301+
3302+
32703303// Upload a file to 2 different builds.
32713304// Verify that we don't download files with same sha and build name and different build number.
32723305func TestArtifactoryDownloadByShaAndBuildName (t * testing.T ) {
0 commit comments