Uploaded image for project: 'AdMaxLocal'
  1. AdMaxLocal
  2. AML-1249

AML: Create user script throws exception - Caught: java.lang.AssertionError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      QA Environment 2

      Groovy scripts updated as on 2013/02/28

    • Sprint:
      Sprint 3 - 2.0.2

      Description

      Create user script throws exception - Caught: java.lang.AssertionError

      Steps to reproduce:

      Create user with newly created reseller.

      Here newly created user: reseller3

      [root@aq-qa2-monman1 groovy]# groovy create-user.groovy -ll TRACE -ah http://aq-qa2-front1:8080/sapi/rest/ -cu atul.sanagar@thesearchagency.com -cp Testing123 -ra reseller3 -u atul.sanagar@rediffmail.com -d "AtulTEST" -r user -ap admin -rt X2CU34D5NWDJU5DIJCN5PP44WW4QO5DMWMR63RJMJQRAWMFLDUXUEJIBKYPLGIGGM3OOHPHI65X7Z5NK3WR5I5HUBEFGNN46PI7DCTQYMXOJ4XOAPGESVJGD6ZOC2OQ2RU7ERQ5VEARQJVHVWCSWX77M4ZFAND23YWNWRD47TUK4EMMWP3ZKUONNHAQ3FHXZEDBMZXR4C5HGCMS4GBR6ABWPNXW3AVGVPJJD2AY
      INFO - API Host: http://aq-qa2-front1:8080/sapi/rest/
      INFO - Protocol: http
      INFO - API Host name: aq-qa2-front1
      INFO - Port Number: 8080
      DEBUG - Getting TSA admin token with admin+tsa@thesearchagency.com
      TRACE - username = admin+tsa@thesearchagency.com, password = admin, realm alias = thesearchagency
      .
      .
      ..
      .
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG -

      {total=0, results=[]}

      DEBUG - --------------------

      Caught: java.lang.AssertionError: Cannot find any resellers in realm id 'com.reseller3'. Service should have returned exactly one reseller. Expression: (response.total == 1)
      java.lang.AssertionError: Cannot find any resellers in realm id 'com.reseller3'. Service should have returned exactly one reseller. Expression: (response.total == 1)
      at create-user.run(create-user.groovy:441)

      Observation/Actual result:

      1.Create user groovy scripts is throwing exception - "Caught: java.lang.AssertionError" . Even though we are getting exception data has entered to smb database.

      mysql> select * from users where email like '%atul.sanagar@rediffmail.com%';
      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

      id realm_id type first_name last_name display description created_on created_by modified_on modified_by active password salt organization language country timezone gender birthday login email homepage home_phone work_phone mobile_phone

      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

      99c6eb59-7eee-4eff-9799-41a0c3865963 com.reseller3 P     AtulTEST   2013-03-01 06:10:57 c7542d20-f6ba-4784-842b-9202a92190e2 2013-03-01 06:10:57 c7542d20-f6ba-4784-842b-9202a92190e2 F 56e62444a3bd36bd02ea8d239428ea9a35e92ce007b2c141bf1159d757eb0ee14f3a39b610e184546b431374340f8042b2514c52607882c35e4c1f1e517637a0 496620796f75206265636f6d6520746f6f20736572696f75732c20796f752077696c6c206c6f736520796f7572207761792e   en US EST M NULL 1970-01-01 00:00:00 atul.sanagar@rediffmail.com        

      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)

      Expected result:

      As we have removed argument "reseller alias (rn) of onboard script (http://jira.ri.thesearchagency.com/browse/AML-1235 ),
      ideally we should remove remove reseller alias ["ra"] from create user script.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              atul.sanagar Atul Sanagar (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: