Skip to content

Commit

Permalink
qase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phearnot committed Nov 30, 2023
1 parent aa254d6 commit d1e4bbd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
11 changes: 7 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Global / onChangedBuildSource := ReloadOnSourceChanges

enablePlugins(GitVersioning)

git.uncommittedSignifier := Some("DIRTY")
git.useGitDescribe := true
git.uncommittedSignifier := Some("DIRTY")
git.useGitDescribe := true
ThisBuild / git.useGitDescribe := true
ThisBuild / PB.protocVersion := "3.24.4" // https://protobuf.dev/support/version-support/#java
ThisBuild / PB.protocVersion := "3.24.4" // https://protobuf.dev/support/version-support/#java

lazy val lang =
crossProject(JSPlatform, JVMPlatform)
Expand Down Expand Up @@ -50,7 +50,10 @@ lazy val `lang-testkit` = project
.dependsOn(`lang-jvm`)
.in(file("lang/testkit"))
.settings(
libraryDependencies ++= Dependencies.test.map(_.withConfigurations(Some("compile"))) ++ Dependencies.qaseReportDeps
libraryDependencies ++=
Dependencies.test.map(_.withConfigurations(Some("compile"))) ++ Dependencies.qaseReportDeps ++ Dependencies.logDeps ++ Seq(
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5"
)
)

lazy val `lang-tests` = project
Expand Down
14 changes: 14 additions & 0 deletions lang/testkit/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date %-5level [%.15thread] %logger{26} - %msg%n</pattern>
</encoder>
</appender>

<logger name="scorex.crypto.signatures.Curve25519$" level="INFO"/>

<root level="${logback.test.level:-DEBUG}">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.wavesplatform.report

import com.typesafe.scalalogging.StrictLogging
import com.wavesplatform.report.QaseReporter.{CheckPRRunIdKey, QaseProjects, TestResult}
import io.qase.api.QaseClient
import io.qase.api.config.QaseConfig.{PROJECT_CODE_KEY, RUN_ID_KEY}
import io.qase.api.exceptions.QaseException
import io.qase.api.services.impl.ReportersResultOperationsImpl
import io.qase.client.ApiClient
import io.qase.client.api.{CasesApi, ResultsApi, RunsApi}
Expand All @@ -15,8 +17,8 @@ import scala.annotation.tailrec
import scala.io.Source
import scala.util.Using

object QaseRunCompleter extends App {
if (QaseClient.getConfig.isEnabled) {
object QaseRunCompleter extends App with StrictLogging {
if (QaseClient.getConfig.isEnabled) try {

val apiClient: ApiClient = QaseClient.getApiClient
val runsApi = new RunsApi(apiClient)
Expand Down Expand Up @@ -78,6 +80,9 @@ object QaseRunCompleter extends App {
}
}(_.foreach(f => Files.delete(f.toPath)))
}
} catch {
case e: QaseException =>
logger.error(s"Qase error: ${e.getCode} ${e.getResponseBody}", e)
}

@tailrec
Expand Down

0 comments on commit d1e4bbd

Please sign in to comment.