Skip to content

Commit ececca7

Browse files
author
Steve Salas
committed
Update HQ and Shared unit tests
1 parent 1a8c74d commit ececca7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

hq/src/test/scala/com/secdec/bytefrog/hq/connect/test/ClientGreeterSpec.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class ClientGreeterSpec extends FunSpec with Matchers with MockFactory with Mock
101101

102102
val greeterHandleHello = mockFunction[Int, Unit]
103103
val greeter = new ClientGreeter(client, mock[TraceControlConnector], mock[TraceRegistry]) {
104-
override def handleHello(pv: Int) = greeterHandleHello(pv)
104+
override def handleHello(pv: Int, projectId: Option[Int]) = greeterHandleHello(pv)
105105
}
106106

107107
clientClose.expects.never
@@ -152,7 +152,7 @@ class ClientGreeterSpec extends FunSpec with Matchers with MockFactory with Mock
152152
}
153153
clientClose.expects.once
154154

155-
greeter.handleHello(1)
155+
greeter.handleHello(1, None)
156156
}
157157

158158
it("should write a configuration to the client if everything goes smoothly in 'handleHello'") {
@@ -180,7 +180,7 @@ class ClientGreeterSpec extends FunSpec with Matchers with MockFactory with Mock
180180
}
181181
clientClose.expects.never
182182

183-
greeter.handleHello(1)
183+
greeter.handleHello(1, None)
184184

185185
}
186186

@@ -209,7 +209,7 @@ class ClientGreeterSpec extends FunSpec with Matchers with MockFactory with Mock
209209
mockedMessageProtocolV2.writeConfigJson.expects("{\"bufferMemoryBudget\":2,\"exclusions\":[],\"heartbeatInterval\":1,\"inclusions\":[],\"numDataSenders\":4,\"queueRetryCount\":3,\"runId\":1}").once()
210210
clientClose.expects.never
211211

212-
greeter.handleHello(1)
212+
greeter.handleHello(1, None)
213213
}
214214

215215
it("should close a 'data' client if the TraceRegistry's getTrace Future doesn't provide a result within 500ms") {

hq/src/test/scala/com/secdec/bytefrog/hq/testutil/MockedSendingConnection.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import com.codedx.codepulse.hq.protocol._
3131
trait MockedSendingHelpers { self: MockFactory =>
3232

3333
class MockedSendingConnection(sender: ControlMessageSender, writer: MockFunction1[ControlMessage, Unit])
34-
extends ControlConnection(1, null, null, sender) {
34+
extends ControlConnection(1, null, null, sender, None) {
3535
val writeMsg = writer
3636
}
3737

shared/src/test/scala/com/secdec/bytefrog/common/config/test/StaticAgentConfigurationSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class StaticAgentConfigurationSuite extends FunSpec with Matchers {
6565
}
6666

6767
describe("StaticAgentConfiguration option string output") {
68-
val testConfig = new StaticAgentConfiguration("host", 1234, "logFile", 30)
68+
val testConfig = new StaticAgentConfiguration("host", 1234, "logFile", 30, 0)
6969

7070
it("should return the correct option string when toOptionString is called") {
7171
val result = testConfig.toOptionString

0 commit comments

Comments
 (0)