laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/42077?usp=email )

Change subject: pySim-shell_test/euicc: ensure test-profile is enabled
......................................................................

pySim-shell_test/euicc: ensure test-profile is enabled

When testing commands like get_profile_info, enable_profile,
disable_profile or the commands to manage notifications, we
should ensure that the correct profile is enabled before
executing the actual testcase.

Change-Id: Ie57b0305876bc5001ab3a9c3a3b5711408161b74
---
M tests/pySim-shell_test/euicc/test_enable_disable_profile.script
M tests/pySim-shell_test/euicc/test_gen_notif.script
M tests/pySim-shell_test/euicc/test_get_profiles_info.script
3 files changed, 13 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/tests/pySim-shell_test/euicc/test_enable_disable_profile.script 
b/tests/pySim-shell_test/euicc/test_enable_disable_profile.script
index 2efbf6e..f56f1d4 100644
--- a/tests/pySim-shell_test/euicc/test_enable_disable_profile.script
+++ b/tests/pySim-shell_test/euicc/test_enable_disable_profile.script
@@ -3,6 +3,9 @@

 select ADF.ISD-R

+# Ensure that the test-profile we intend to test with is actually enabled
+enable_profile --iccid 89000123456789012341
+
 # by ICCID (pre-installed test profile on sysmoEUICC1-C2T)
 disable_profile --iccid 89000123456789012341 > enable_disable_profile.tmp
 enable_profile --iccid 89000123456789012341 >> enable_disable_profile.tmp
diff --git a/tests/pySim-shell_test/euicc/test_gen_notif.script 
b/tests/pySim-shell_test/euicc/test_gen_notif.script
index feb7ef2..a7dc63c 100644
--- a/tests/pySim-shell_test/euicc/test_gen_notif.script
+++ b/tests/pySim-shell_test/euicc/test_gen_notif.script
@@ -3,6 +3,11 @@
 
 select ADF.ISD-R

+# Ensure that the test-profile is actually enabled. (In case te test-profile
+# was disabled, a notification may be generated. The testcase should tolerate
+# that)
+enable_profile --iccid 89000123456789012341
+
 # Generate two (additional) notifications by quickly enabeling the test profile
 enable_profile --iccid 8949449999999990031
 enable_profile --iccid 89000123456789012341
diff --git a/tests/pySim-shell_test/euicc/test_get_profiles_info.script 
b/tests/pySim-shell_test/euicc/test_get_profiles_info.script
index 352be7a..668f7eb 100644
--- a/tests/pySim-shell_test/euicc/test_get_profiles_info.script
+++ b/tests/pySim-shell_test/euicc/test_get_profiles_info.script
@@ -1,5 +1,10 @@
 set debug true
 set echo true

+# The output of get_profiles_info will also include the "profile_state", which
+# can be either "enabled" or "disabled". Ensure that the correct profile is
+# enabled.
+enable_profile --iccid 89000123456789012341
+
 select ADF.ISD-R
 get_profiles_info > get_profiles_info.tmp

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42077?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie57b0305876bc5001ab3a9c3a3b5711408161b74
Gerrit-Change-Number: 42077
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>

Reply via email to