Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Add validator rust tests to build
Browse files Browse the repository at this point in the history
Adds a docker-compose file to run `cargo test` in the validator directory
running any doc tests, unit tests, and any tests in the `validator/tests` directory.

Signed-off-by: Boyd Johnson <bjohnson@bitwise.io>
  • Loading branch information
Boyd Johnson authored and boydjohnson committed May 3, 2018
1 parent ed8c494 commit f59a570
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/run_tests
Expand Up @@ -275,6 +275,7 @@ test_validator() {
run_docker_test test_namespace_permission
copy_coverage .coverage.namespace_permission
run_docker_test test_state_verifier --timeout 30
run_docker_test ./validator/tests/unit_rust_validator.yaml
}

test_go_sdk() {
Expand Down
25 changes: 25 additions & 0 deletions validator/tests/unit_rust_validator.yaml
@@ -0,0 +1,25 @@
# Copyright 2018 Intel Corporation
#
# Licensed 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.
# ------------------------------------------------------------------------------

version: "2.1"

services:

unit-rust-validator:
image: sawtooth-dev-validator:$ISOLATION_ID
volumes:
- $SAWTOOTH_CORE:/project/sawtooth-core
working_dir: /project/sawtooth-core/validator
command: cargo test

0 comments on commit f59a570

Please sign in to comment.