-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #748 from wavesplatform/NODE-414-status-rest-api
NODE-414 Extend API for /node/status + make it available at start
- Loading branch information
Showing
13 changed files
with
153 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.wavesplatform.it | ||
|
||
import com.wavesplatform.it.NodeApiTestSuite._ | ||
import org.scalatest.{BeforeAndAfterAll, FreeSpec, Matchers} | ||
import scorex.utils.ScorexLogging | ||
|
||
import scala.concurrent.ExecutionContext.Implicits.global | ||
import scala.concurrent._ | ||
import scala.concurrent.duration.DurationInt | ||
|
||
class NodeApiTestSuite extends FreeSpec with Matchers with BeforeAndAfterAll with ScorexLogging { | ||
|
||
private lazy val docker = Docker(getClass) | ||
|
||
"/node/status should report status" in { | ||
val node = docker.startNode(NodeConfig) | ||
val f = for { | ||
status <- node.status | ||
_ = log.trace(s"#### $status") | ||
_ = assert(status.blockchainHeight >= status.stateHeight) | ||
} yield succeed | ||
|
||
Await.ready(f, 2.minute) | ||
} | ||
|
||
override protected def afterAll(): Unit = { | ||
super.afterAll() | ||
docker.close() | ||
} | ||
} | ||
|
||
private object NodeApiTestSuite { | ||
|
||
private val NodeConfig = NodeConfigs.newBuilder.withDefault(1).build().head | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.