@@ -44,7 +44,7 @@ import org.ossreviewtoolkit.utils.common.div
4444import org.ossreviewtoolkit.utils.common.safeMkdirs
4545import org.ossreviewtoolkit.utils.ort.storage.LocalFileStorage
4646
47- private val PROVENANCE = RepositoryProvenance (
47+ private val REPOSITORY_PROVENANCE = RepositoryProvenance (
4848 vcsInfo = VcsInfo (
4949 type = VcsType .GIT ,
5050 url = " url" ,
@@ -91,8 +91,8 @@ class FileArchiverTest : StringSpec() {
9191 createFile(" path/LICENSE" )
9292
9393 val archiver = FileArchiver (setOf (" **/LICENSE" ), storage)
94- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
95- val result = archiver.unarchive(targetDir, PROVENANCE )
94+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
95+ val result = archiver.unarchive(targetDir, REPOSITORY_PROVENANCE )
9696
9797 result shouldBe true
9898 with (targetDir) {
@@ -108,8 +108,8 @@ class FileArchiverTest : StringSpec() {
108108 createFile(" d/LiCeNsE" )
109109
110110 val archiver = FileArchiver (setOf (" **/LICENSE" ), storage)
111- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
112- val result = archiver.unarchive(targetDir, PROVENANCE )
111+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
112+ val result = archiver.unarchive(targetDir, REPOSITORY_PROVENANCE )
113113
114114 result shouldBe true
115115 with (targetDir) {
@@ -128,8 +128,8 @@ class FileArchiverTest : StringSpec() {
128128
129129 val archiver = FileArchiver (setOf (" a" , " **/a" ), storage)
130130
131- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
132- val result = archiver.unarchive(targetDir, PROVENANCE )
131+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
132+ val result = archiver.unarchive(targetDir, REPOSITORY_PROVENANCE )
133133
134134 result shouldBe true
135135 targetDir.shouldContainFileWithContent(" a" )
@@ -151,9 +151,9 @@ class FileArchiverTest : StringSpec() {
151151 createFile(" c/b" )
152152
153153 val archiver = FileArchiver (setOf (" **" ), storage)
154- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
154+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
155155
156- val result = archiver.unarchive(targetDir, PROVENANCE )
156+ val result = archiver.unarchive(targetDir, REPOSITORY_PROVENANCE )
157157
158158 result shouldBe true
159159 with (targetDir) {
@@ -167,18 +167,18 @@ class FileArchiverTest : StringSpec() {
167167 " Empty archives can be handled" {
168168 val archiver = FileArchiver (LicenseFilePatterns .DEFAULT .allLicenseFilenames, storage)
169169
170- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
170+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
171171
172- archiver.unarchive(targetDir, PROVENANCE ) shouldBe true
172+ archiver.unarchive(targetDir, REPOSITORY_PROVENANCE ) shouldBe true
173173 targetDir shouldContainNFiles 0
174174 }
175175
176176 " exclude basic binary license file" {
177177 createFile(" License" ) { writeBytes(byteArrayOf(0xFF .toByte(), 0xD8 .toByte())) }
178178
179179 val archiver = FileArchiver (LicenseFilePatterns .DEFAULT .allLicenseFilenames, storage)
180- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
181- val result = archiver.unarchive(targetDir, PROVENANCE )
180+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
181+ val result = archiver.unarchive(targetDir, REPOSITORY_PROVENANCE )
182182
183183 result shouldBe true
184184 targetDir shouldNot containFile(" License" )
@@ -188,8 +188,8 @@ class FileArchiverTest : StringSpec() {
188188 createFile(" License" ) { writeText(" ぁあぃいぅうぇえぉおかが" ) }
189189
190190 val archiver = FileArchiver (LicenseFilePatterns .DEFAULT .allLicenseFilenames, storage)
191- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
192- val result = archiver.unarchive(targetDir, PROVENANCE )
191+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
192+ val result = archiver.unarchive(targetDir, REPOSITORY_PROVENANCE )
193193
194194 result shouldBe true
195195 targetDir should containFile(" License" )
@@ -199,8 +199,8 @@ class FileArchiverTest : StringSpec() {
199199 createFile(" License.md" ) { writeText(" # Heading level 1" ) }
200200
201201 val archiver = FileArchiver (LicenseFilePatterns .DEFAULT .allLicenseFilenames, storage)
202- archiver.archive(workingDir, PROVENANCE , Identifier .EMPTY )
203- val result = archiver.unarchive(targetDir, PROVENANCE )
202+ archiver.archive(workingDir, REPOSITORY_PROVENANCE , Identifier .EMPTY )
203+ val result = archiver.unarchive(targetDir, REPOSITORY_PROVENANCE )
204204
205205 result shouldBe true
206206 targetDir should containFile(" License.md" )
0 commit comments