Skip to content

Commit

Permalink
remove skip-ias-check leftovers (#2554)
Browse files Browse the repository at this point in the history
  • Loading branch information
kziemianek committed Mar 5, 2024
1 parent 5534947 commit bd95086
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
PACKAGES=$(find pallets/ -name "Cargo.toml" | while read -r f; do pn=$(grep name "$f" | \
tr '"' "'" | sed "s/'$//;s/.*'//"); f="file://$(pwd)/${f//\/Cargo.toml/#$pn}"; \
cargo pkgid "$f"; done | paste -s -d "," -)
cargo tarpaulin --features=skip-ias-check --no-fail-fast -o Xml -p "$PACKAGES" \
cargo tarpaulin --no-fail-fast -o Xml -p "$PACKAGES" \
--exclude-files **/mock.rs **/weights.rs **/benchmarking.rs **/weights/* node/* runtime/*
- name: Upload to codecov.io
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ launch-custom-binary-rococo:

.PHONY: test-cargo-all ## cargo test --all
test-cargo-all:
@cargo test --release --all --features=skip-ias-check
@cargo test --release --all

.PHONY: test-cargo-all-benchmarks ## cargo test --all --features runtime-benchmarks
test-cargo-all-benchmarks:
@cargo test --release --all --features runtime-benchmarks --features=skip-ias-check
@cargo test --release --all --features runtime-benchmarks

.PHONY: test-ts-docker-litentry ## Run litentry ts tests with docker without clean-up
test-ts-docker-litentry: launch-docker-litentry launch-docker-bridge
Expand Down
4 changes: 1 addition & 3 deletions local-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

## Prerequisite
- worker built with ` SGX_MODE=SW make`
- integritee-node built with `cargo build --release --features skip-ias-check`
- integritee-node built with `cargo build --release`

In case you have
- a sgx hardware and compile the worker with `SGX_MODE=HW` (default mode)
- a valid intel IAS key (development key is fine)

you can omit the `--features skip-ias-check` when building the node

## Steps
Check possible options to launch both node and worker(s)
```bash
Expand Down
38 changes: 0 additions & 38 deletions pallets/identity-management/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ use core_primitives::{ErrorDetail, IMPError};
use frame_support::{assert_noop, assert_ok};
use sp_core::H256;

#[cfg(feature = "skip-ias-check")]
use pallet_teebag::test_util::TEST8_CERT;

use pallet_teebag::test_util::{get_signer, TEST8_MRENCLAVE};
type SystemAccountId = <Test as frame_system::Config>::AccountId;
const ALICE_PUBKEY: &[u8; 32] = &[1u8; 32];
Expand Down Expand Up @@ -119,41 +116,6 @@ fn activate_identity_works() {
});
}

#[test]
#[cfg(feature = "skip-ias-check")]
fn tee_callback_with_registered_enclave_works() {
// copied from https://github.com/integritee-network/pallets/blob/5b0706e8b9f726d81d8aff74efbae8e023e783b7/test-utils/src/ias.rs#L147
const URL: &[u8] =
&[119, 115, 58, 47, 47, 49, 50, 55, 46, 48, 46, 48, 46, 49, 58, 57, 57, 57, 49];
new_test_ext().execute_with(|| {
let alice: SystemAccountId = get_signer(ALICE_PUBKEY);
assert_ok!(Teebag::register_enclave(
RuntimeOrigin::signed(alice.clone()),
Default::default(),
Default::default(),
TEST8_CERT.to_vec(),
URL.to_vec(),
None,
None,
Default::default(),
));

assert_ok!(IdentityManagement::some_error(
RuntimeOrigin::signed(alice),
None,
IMPError::LinkIdentityFailed(ErrorDetail::WrongWeb2Handle),
H256::default(),
));
System::assert_last_event(RuntimeEvent::IdentityManagement(
crate::Event::LinkIdentityFailed {
prime_identity: None,
detail: ErrorDetail::WrongWeb2Handle,
req_ext_hash: H256::default(),
},
));
});
}

#[test]
fn tee_callback_with_unregistered_enclave_fails() {
new_test_ext().execute_with(|| {
Expand Down
2 changes: 0 additions & 2 deletions scripts/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ function bitacross_clippy() {
function parachain_check() {
make clippy
cargo test --locked --release -p pallet-* --lib
cargo test --locked --release -p pallet-* --lib --features=skip-ias-check
cargo test --locked --release -p pallet-* --lib --features=runtime-benchmarks
cargo test --locked --release -p pallet-* --lib --features=skip-ias-check,runtime-benchmarks
cargo test --locked --release -p rococo-parachain-runtime --lib
cargo test --locked --release -p litmus-parachain-runtime --lib
cargo test --locked --release -p litentry-parachain-runtime --lib
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you think parachain-node launch too slowly, can use this branch: [litentry-ru

```bash
# build integritee-node(not parachain-node)
cargo build --release --features "skip-extrinsic-filtering skip-ias-check"
cargo build --release --features "skip-extrinsic-filtering"
```

## Build and Run
Expand Down

0 comments on commit bd95086

Please sign in to comment.