From d14de45aaa14f24a73df0c0cf124878cc6290e33 Mon Sep 17 00:00:00 2001 From: Constantine Solovev Date: Tue, 6 Mar 2018 17:19:44 +0400 Subject: [PATCH] Refactoring and test (#74) * Add entropy to rocksDb name in tests * Config logging * DatasetNodeStorage unit test * scalariform * config for DatasetNodeStorage * fix reference.conf * auto creating headers on `sbt commit` * add headers * Fix tests * remove conf * scalariform --- .../test/scala/fluence/crypto/AesJSSpec.scala | 17 +++++++++++++++++ .../test/scala/fluence/crypto/JSHashSpec.scala | 17 +++++++++++++++++ jvm/src/test/scala/fluence/crypto/AesSpec.scala | 17 +++++++++++++++++ .../test/scala/fluence/crypto/JvmHashSpec.scala | 17 +++++++++++++++++ .../fluence/crypto/hash/CryptoHasher.scala | 2 +- 5 files changed, 69 insertions(+), 1 deletion(-) diff --git a/js/src/test/scala/fluence/crypto/AesJSSpec.scala b/js/src/test/scala/fluence/crypto/AesJSSpec.scala index 967b97d..477134c 100644 --- a/js/src/test/scala/fluence/crypto/AesJSSpec.scala +++ b/js/src/test/scala/fluence/crypto/AesJSSpec.scala @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2017 Fluence Labs Limited + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package fluence.crypto import cats.instances.try_._ diff --git a/js/src/test/scala/fluence/crypto/JSHashSpec.scala b/js/src/test/scala/fluence/crypto/JSHashSpec.scala index e1de2c0..0cf954e 100644 --- a/js/src/test/scala/fluence/crypto/JSHashSpec.scala +++ b/js/src/test/scala/fluence/crypto/JSHashSpec.scala @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2017 Fluence Labs Limited + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package fluence.crypto import fluence.crypto.facade.ecdsa.{ SHA1, SHA256 } diff --git a/jvm/src/test/scala/fluence/crypto/AesSpec.scala b/jvm/src/test/scala/fluence/crypto/AesSpec.scala index 36ea20c..fd39542 100644 --- a/jvm/src/test/scala/fluence/crypto/AesSpec.scala +++ b/jvm/src/test/scala/fluence/crypto/AesSpec.scala @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2017 Fluence Labs Limited + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package fluence.crypto import fluence.crypto.algorithm.{ AesConfig, AesCrypt, CryptoErr } diff --git a/jvm/src/test/scala/fluence/crypto/JvmHashSpec.scala b/jvm/src/test/scala/fluence/crypto/JvmHashSpec.scala index b99304d..714dcce 100644 --- a/jvm/src/test/scala/fluence/crypto/JvmHashSpec.scala +++ b/jvm/src/test/scala/fluence/crypto/JvmHashSpec.scala @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2017 Fluence Labs Limited + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package fluence.crypto import fluence.crypto.hash.JdkCryptoHasher diff --git a/src/main/scala/fluence/crypto/hash/CryptoHasher.scala b/src/main/scala/fluence/crypto/hash/CryptoHasher.scala index 35131ec..8e0eac9 100644 --- a/src/main/scala/fluence/crypto/hash/CryptoHasher.scala +++ b/src/main/scala/fluence/crypto/hash/CryptoHasher.scala @@ -33,4 +33,4 @@ trait CryptoHasher[M, H] { object CryptoHasher { type Bytes = CryptoHasher[Array[Byte], Array[Byte]] -} \ No newline at end of file +}