markusthoemmes commented on a change in pull request #2957: splunk logstore URL: https://github.com/apache/incubator-openwhisk/pull/2957#discussion_r151360560
########## File path: tests/src/test/scala/whisk/core/containerpool/logging/LogDriverLogStoreTests.scala ########## @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package whisk.core.containerpool.logging + +import akka.actor.ActorSystem +import akka.testkit.TestKit +import org.scalatest.FlatSpecLike +import org.scalatest.Matchers +import pureconfig.error.ConfigReaderException + +class LogDriverLogStoreTests extends TestKit(ActorSystem("LogDriverLogStore")) with FlatSpecLike with Matchers { + + val testConfig = ConsumerlessLogDriverLogStoreConfig( + "some message", + "fluentd", + Set("fluentd-address=localhost:24225", "tag=OW_CONTAINER")) + + behavior of "LogDriver LogStore" + + it should "fail when loading out of box configs (because whisk.logstore doesn't exist)" in { + assertThrows[ConfigReaderException[_]] { + val logDriverLogStore = new LogDriverLogStore(system) + } Review comment: FWIW there is: ```scala a[ConfigReaderException] should be thrownBy new LogDriverLogStore(system)` ``` ScalaTest's matchers usually result in better error messages vs. general asserts. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
