Skip to content

Commit

Permalink
Migrate diktat smoke tests to SAVE-cli mechanism
Browse files Browse the repository at this point in the history
### What's done:
* migrated diktat smoke tests to SAVE-cli mechanism
Closes #1383
  • Loading branch information
Cheshiriks committed Jul 14, 2022
1 parent 04dc7ed commit 23ec13e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.cqfn.diktat.ruleset.smoke

import org.cqfn.diktat.util.SAVE_VERSION
import org.apache.commons.io.FileUtils
import org.apache.http.client.methods.CloseableHttpResponse
import org.apache.http.client.methods.HttpGet
Expand Down Expand Up @@ -66,7 +67,6 @@ class DiktatSaveSmokeTest : DiktatSmokeTestBase() {

companion object {
private const val KTLINT_VERSION = "0.46.1"
private const val SAVE_VERSION = "0.3.2"

private fun getSaveForCurrentOs() = when {
System.getProperty("os.name").startsWith("Linux", ignoreCase = true) -> "save-$SAVE_VERSION-linuxX64.kexe"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import java.nio.file.Path
import kotlin.io.path.bufferedWriter
import kotlin.io.path.div

const val SAVE_VERSION: String = "0.3.2"

/**
* @property resourceFilePath path to files which will be compared in tests
*/
Expand Down Expand Up @@ -128,8 +130,4 @@ open class FixTestBase(

return testComparatorUnit.compareFilesFromFileSystem(expected, actual)
}

companion object {
private const val SAVE_VERSION = "0.3.2"
}
}

0 comments on commit 23ec13e

Please sign in to comment.