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

disable/activate merchant scripts are not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      • SAPI - OMS-2.0.2-Prod - Build 38
      • UI 2.0.2 - Build 34
      • Core - 2.0.2 Build 6
      • BidMgr/Listener - 2.0.2 - 2013-02-27 Build 5

    • Sprint:
      Sprint 3 - 2.0.2

      Description

      When running the disable merchant script, the merchant is removed from the UI, but I get exceptions in the logs.

      After talking to Stacie, it sounds like the merchant is not fully disabled. She suggested if we want to disable a merchant in 2.0.2, we set them to active = false in the db and pause their orders.

      This is the same for the activate merchants script.

      Script I ran with the output:

      [jelliott@aq-qa-tomcat1 groovy]$ groovy disable-merchant.groovy -ah http://aq-qa-tomcat1:8080/sapi/rest/ -uuid 280d4d43-bc86-41cf-8237-73e1bc7e4c21 -ru jelliott@thesearchagency.com
      INFO - API Host: http://aq-qa-tomcat1:8080/sapi/rest/
      Please enter the password for admin+tsa@thesearchagency.com:
      DEBUG - Logging in as TSA Admin
      DEBUG - username = admin+tsa@thesearchagency.com, password = admin, realm alias = thesearchagency

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 4fe45bd4-59b7-473f-b477-2034901bb5d4
      DEBUG - Date : Thu, 28 Feb 2013 18:33:07 GMT
      DEBUG - Content-Type : text/plain
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - X2CU34D5NWDJUBO3DDBNQBOW3AQWAYYXMGRLXB6QWT677A3IYCVA4MS2KQXIF3SQFUNATAL3OPISRD6UUSC4EJIWIH7Z3SM5NVKXMHUX26HZZBXSKI5KSB2WT4USO5FTWNTMQMOLB2AK3N7T6JH2Q5PFNQGTBFWJG2OSO3HQS2S4JOXV6BN5DGYUSD3KM3FCF6XKYEQRZFMBQ6SADQNQAFUZVRXUEWM5G3MEDEQ=
      DEBUG - --------------------

      DEBUG - Getting realm for username 'jelliott@thesearchagency.com'
      DEBUG - TQL Query: SELECT WHERE Email == "jelliott@thesearchagency.com"

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : bd921d19-8cc0-4b22-8907-e78699d2c6d2
      DEBUG - Date : Thu, 28 Feb 2013 18:33:07 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {total=1, results=[{lastName=, birthday=null, lastLoginDate=2013-02-28T18:30:23.000+0000, countryCode=us, workPhoneExtension=null, properties={}, homePhone=, id=9f2b0525-a8bc-4275-a1be-10f6826c4f07, organization=, timezone=EST, mobilePhone=, createdBy=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, realm=com.optus, email=jelliott@thesearchagency.com, description=, lastModifiedBy=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, gender=M, lastModifiedDate=2013-02-28T17:08:35.000+0000, active=true, language=en, firstName=, workPhone=, displayName=jen, createdDate=2013-02-28T17:08:35.000+0000}]}
      DEBUG - --------------------

      DEBUG - Realm alias: optus
      DEBUG - Getting realm token: username = jelliott@thesearchagency.com, realm alias = optus

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : fb0a4b25-d52f-45a9-96a4-9a00b904d690
      DEBUG - Date : Thu, 28 Feb 2013 18:33:07 GMT
      DEBUG - Content-Type : text/plain
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - X2CU34D5NWDJUBO3DDBNQBOW3AQWAYYXMGRLXB4U5UMUAVEDGSNBWYRBQFJHVSJRAB4WEBFG5F6YP74UMH7RXRF2BZ57YNL5HP6BZCWGZWDHXLIIH5RX5JIIN7G37P5GA3M6GF7FUNU76SHN4AU662NTOGN5J7UUWYPBBORUEHSAFPOXJ246ZXJ2KDAKPXPSUAFH63EMJR4X3YXQ76IPWLFKCLVC2QHBWSNP3HYID4BP4Z42LZEPA2MPLCXQPR7UJ2UYCKEXCCZJS===
      DEBUG - --------------------

      DEBUG - Getting merchant with uuid '280d4d43-bc86-41cf-8237-73e1bc7e4c21'

      Feb 28, 2013 6:33:07 PM groovyx.net.http.ParserRegistry getAt
      WARNING: Cannot find parser for content-type: application/json, text/plain – using default parser.
      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : c95e61ee-7099-40c5-9325-3262a81bf515
      DEBUG - Date : Thu, 28 Feb 2013 18:33:07 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {resellerId=1111a81e-1197-4a79-9111-a81e11973a79, contactEmail=jen@testing6.com, contactPhoneNumber=78978978999, properties={}, url=, id=280d4d43-bc86-41cf-8237-73e1bc7e4c21, groupId=280d4d43-bc86-41cf-8237-73e1bc7e4c21, customerId=jen, phoneNumber=78978978999, createdBy=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, createdByName=OPTUS Tenant, realm=com.optus, contactName=jen, description=, userId=7b1cae60-7b91-4042-8c34-a028a8c06679, name=jen, lastModifiedBy=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, lastModifiedDate=2012-12-26T15:33:01.000+0000, active=true, lastModifiedByName=OPTUS Tenant, displayName=jen test, createdDate=2012-12-26T15:33:01.000+0000, comments=}
      DEBUG - --------------------

      DEBUG - Deleting all orders for merchant 'jen test'
      DEBUG - Getting all orders
      DEBUG - TQL query: SELECT WHERE associatedMerchant.id == "280d4d43-bc86-41cf-8237-73e1bc7e4c21"

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 270714b3-d671-457e-bde4-2e8098b52e18
      DEBUG - Date : Thu, 28 Feb 2013 18:33:07 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {total=1, results=[{billingInfoCaptured=true, state=ERROR, distributionBudgets=[

      {markupBudget=8, budget=8, markupMultiplier=0, service=GOOGLE}

      ], semLandingPageURL=http://www.testing.com, creator=

      {id=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, name=OPTUS Tenant}, id=e16194c1-7c87-4392-9416-34a8edf28ba8, campaignTargets=[{businessArea={id=10004, title=Bed & Breakfasts}, location={id=1, title=United States}, status=VALID, service=null}], modifier={id=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, name=OPTUS Tenant}

      , creationDate=2012-12-26T15:33:29.000Z, serviceEstimates=[], name=, modificationDate=2012-12-26T15:33:29.000Z, comment=, associatedMerchant={id=280d4d43-bc86-41cf-8237-73e1bc7e4c21, customerId=null, name=jen test}}], count=1, pages=1, current=1}
      DEBUG - --------------------

      DEBUG - Order UUID: e16194c1-7c87-4392-9416-34a8edf28ba8
      DEBUG - Current order state for 'e16194c1-7c87-4392-9416-34a8edf28ba8': ERROR
      DEBUG - running change-order-state.groovy
      DEBUG -
      ERROR - Failed to delete order '' (uuid: 'e16194c1-7c87-4392-9416-34a8edf28ba8") from 'jen test' merchant group
      DEBUG - All orders for merchant 'jen test' successfully set to DELETED or CANCELLED
      INFO - Setting jen test merchant to inactive

      Feb 28, 2013 6:33:19 PM groovyx.net.http.ParserRegistry getAt
      WARNING: Cannot find parser for content-type: application/json, text/plain – using default parser.
      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 8355939e-f339-45f7-91eb-643c098c8894
      DEBUG - Date : Thu, 28 Feb 2013 18:33:19 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG -
      DEBUG - --------------------

      INFO - jen test merchant successfully set to inactive
      INFO - Getting 'jen test' merchant group
      DEBUG - TQL query: SELECT WHERE Name = 'jen'

      Feb 28, 2013 6:33:19 PM groovyx.net.http.ParserRegistry getAt
      WARNING: Cannot find parser for content-type: application/json, text/plain – using default parser.
      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : aeb1b10d-9d5b-43a1-a41b-ab2c242ec551
      DEBUG - Date : Thu, 28 Feb 2013 18:33:19 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {total=2, results=[

      {id=280d4d43-bc86-41cf-8237-73e1bc7e4c21, createdBy=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, realm=com.optus, description=, name=jen, lastModifiedBy=675c1ffb-1109-4e3d-8e59-2b06c6b2ec66, active=true, lastModifiedDate=2012-12-26T15:33:01.000+0000, displayName=jen test, createdDate=2012-12-26T15:33:01.000+0000}

      ,

      {id=ce8e9c3b-d888-4c6e-b1b5-c58656f867ee, createdBy=273c4aab-e844-42d1-8c5a-2063ca535bba, realm=com.reseller1, description=, name=jen, lastModifiedBy=273c4aab-e844-42d1-8c5a-2063ca535bba, active=true, lastModifiedDate=2013-01-24T18:13:18.000+0000, displayName=jen, createdDate=2013-01-24T18:13:18.000+0000}

      ]}
      DEBUG - --------------------

      Caught: java.lang.AssertionError: Cannot find 'jen test' merchant group. Service should have returned exactly 1 group. Expression: (jsonResponse.results.size() == 1)
      java.lang.AssertionError: Cannot find 'jen test' merchant group. Service should have returned exactly 1 group. Expression: (jsonResponse.results.size() == 1)
      at disable-merchant.run(disable-merchant.groovy:392)

        Attachments

          Activity

            People

            • Assignee:
              stacie.waleyko Stacie Waleyko (Inactive)
              Reporter:
              jelliott Jen Clarke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: