From cc3bebd90c24b187379027e6a618e206da89d7a9 Mon Sep 17 00:00:00 2001 From: DanB Date: Tue, 22 Sep 2015 12:03:48 +0200 Subject: [PATCH] Correcting tutorial for opensips installation --- docs/tut_opensips_installs.rst | 8 +++----- general_tests/tutorial_osips_calls_test.go | 22 +++------------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/docs/tut_opensips_installs.rst b/docs/tut_opensips_installs.rst index 2080e548e..3b83a9aba 100644 --- a/docs/tut_opensips_installs.rst +++ b/docs/tut_opensips_installs.rst @@ -1,7 +1,7 @@ Software installation ===================== -As operating system we have choosen Debian Wheezy, since all the software components we use provide packaging for it. +As operating system we have choosen Debian Jessie, since all the software components we use provide packaging for it. OpenSIPS_ --------- @@ -9,10 +9,8 @@ OpenSIPS_ We got OpenSIPS_ installed via following commands: :: - wget http://apt.opensips.org/key.asc - apt-key add key.asc - cd /etc/apt/sources.list.d/ - wget http://apt.itsyscom.com/conf/opensips.wheezy.apt.list + wget -O - http://apt.opensips.org/key.asc | apt-key add - + echo "deb http://apt.opensips.org/debian/stable-2.1/jessie opensips-2.1-jessie main" > /etc/apt/sources.list.d/opensips.list apt-get update apt-get install opensips opensips-json-module opensips-restclient-module diff --git a/general_tests/tutorial_osips_calls_test.go b/general_tests/tutorial_osips_calls_test.go index 25fa947de..5f1bcafe3 100644 --- a/general_tests/tutorial_osips_calls_test.go +++ b/general_tests/tutorial_osips_calls_test.go @@ -411,7 +411,7 @@ func TestTutOsipsCalls1002Cdrs(t *testing.T) { req := utils.RpcCdrsFilter{Accounts: []string{"1002"}, RunIds: []string{utils.META_DEFAULT}} if err := tutOsipsCallsRpc.Call("ApierV2.GetCdrs", req, &reply); err != nil { t.Error("Unexpected error: ", err.Error()) - } else if len(reply) != 1 { + } else if len(reply) != 2 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { @@ -485,7 +485,7 @@ func TestTutOsipsCalls1004Cdrs(t *testing.T) { } -// Make sure account was debited properly +// Make sure aliasing was done for 1006 and we have no CDRs for it func TestTutOsipsCalls1006Cdrs(t *testing.T) { if !*testCalls { return @@ -494,24 +494,8 @@ func TestTutOsipsCalls1006Cdrs(t *testing.T) { req := utils.RpcCdrsFilter{Accounts: []string{"1006"}, RunIds: []string{utils.META_DEFAULT}} if err := tutOsipsCallsRpc.Call("ApierV2.GetCdrs", req, &reply); err != nil { t.Error("Unexpected error: ", err.Error()) - } else if len(reply) != 1 { + } else if len(reply) != 0 { t.Error("Unexpected number of CDRs returned: ", len(reply)) - } else { - if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { - t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) - } - if reply[0].ReqType != utils.META_PREPAID { - t.Errorf("Unexpected ReqType for CDR: %+v", reply[0]) - } - if reply[0].Destination != "1002" { - t.Errorf("Unexpected Destination for CDR: %+v", reply[0]) - } - if reply[0].Usage != "64" && reply[0].Usage != "65" { // Usage as seconds - t.Errorf("Unexpected Usage for CDR: %+v", reply[0]) - } - if reply[0].Cost == -1.0 { // Cost was not calculated - t.Errorf("Unexpected Cost for CDR: %+v", reply[0]) - } } }