From a849924327cc6c07620fa993e4092768829542e0 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Tue, 8 Jan 2019 20:02:09 -0800 Subject: Do not check for errors in connect tests The connect_* device tests fail when run in a setup with a Pro and Storage stick present. The problem is that these tests assume only one stick to be present, and that the corresponding connect function for the other stick reports an error. However, in a two stick setup there is no such guarantee. This patch removes tests for those assumptions. --- tests/device.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'tests') diff --git a/tests/device.rs b/tests/device.rs index db8194c..4d78f12 100644 --- a/tests/device.rs +++ b/tests/device.rs @@ -45,9 +45,6 @@ fn connect_pro(device: Pro) { assert!(nitrokey::connect().is_ok()); assert!(nitrokey::connect_model(nitrokey::Model::Pro).is_ok()); assert!(nitrokey::Pro::connect().is_ok()); - - assert!(nitrokey::connect_model(nitrokey::Model::Storage).is_err()); - assert!(nitrokey::Storage::connect().is_err()); } #[test_device] @@ -58,9 +55,6 @@ fn connect_storage(device: Storage) { assert!(nitrokey::connect().is_ok()); assert!(nitrokey::connect_model(nitrokey::Model::Storage).is_ok()); assert!(nitrokey::Storage::connect().is_ok()); - - assert!(nitrokey::connect_model(nitrokey::Model::Pro).is_err()); - assert!(nitrokey::Pro::connect().is_err()); } fn assert_empty_serial_number() { -- cgit v1.2.1