Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

Commit

Permalink
SYNR-1084
Browse files Browse the repository at this point in the history
  • Loading branch information
brucehoff committed Mar 24, 2017
2 parents 7b91adf + 791e3c5 commit 9dd5fa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -2,8 +2,8 @@
# Everything that needs to be done before building the package goes here:

# download jar file from artifactory
# note, this gets version 162.0. To change versions requires changing the following line in two places
export srcjar=http://sagebionetworks.artifactoryonline.com/sagebionetworks/libs-releases-local/org/sagebionetworks/lib-auto-generated/162.0/lib-auto-generated-162.0.jar
# note, this gets version 174.0. To change versions requires changing the following line in two places
export srcjar=http://sagebionetworks.artifactoryonline.com/sagebionetworks/libs-releases-local/org/sagebionetworks/lib-auto-generated/174.0/lib-auto-generated-174.0.jar
wget -O temp.jar $srcjar
if [ "$?" -ne "0" ]; then
curl -o temp.jar $srcjar
Expand Down
30 changes: 0 additions & 30 deletions inst/integrationTests/test_FileCRUDS4.R
Expand Up @@ -405,33 +405,3 @@ integrationTestReplaceFileAnnotations <-
checkTrue(all(c("annotation3", "annotation4", "annotation5") %in% annotationNames(createdFile)))
}

integrationTestFileNameOverride <-
function()
{
## Create Project
project <- Project()
createdProject <- createEntity(project)
synapseClient:::.setCache("testProject", createdProject)

## Create File
file<-createFileInMemory(createdProject) # file name will look like "file11f74c33ab59"
propertyValue(file, "name") <- "testFileName"
propertyValue(file, "fileNameOverride")<-"testName.txt"
propertyValue(file,"parentId") <- propertyValue(createdProject, "id")
createdFile <- createEntity(file)
id<-propertyValue(createdFile, "id")
checkEquals(propertyValue(createdFile,"name"), propertyValue(file, "name"))
checkEquals(propertyValue(createdFile,"parentId"), propertyValue(createdProject, "id"))
checkEquals(propertyValue(createdFile,"fileNameOverride"), "testName.txt")
updatedFile<-synStore(createdFile)
# the bug in SYNR-989 was that the file-name override disappears
checkEquals(propertyValue(updatedFile,"fileNameOverride"), "testName.txt")
# we can also check by downloading
unlink(getFileLocation(updatedFile))
retrievedFile<-synGet(id)
# finally, check that the over ride name is used to download the file
checkEquals(basename(getFileLocation(retrievedFile)), "testName.txt")
}



0 comments on commit 9dd5fa8

Please sign in to comment.