Git Product home page Git Product logo

jmap-testsuite's People

Contributors

ajaysusarla avatar brong avatar elliefm avatar ksmurchison avatar mmcclimon avatar rjbs avatar rsto avatar wolfsage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jmap-testsuite's Issues

tool to compile-check the scripts/tests

I'd like this mainly to be able to quickly get a dump of any missing/outdated dependencies after an update. I'm currently doing this manually by digging these commands out of my bash history each time:

find . -name \*.pm | grep -v '\.git\/' | xargs -l1 perl -I$PWD/lib -c
find . -name \*.t | grep -v '\.git\/' | xargs -l1 perl -I$PWD/lib -c

Obviously I could just bung this into a shell script, but I don't know if there's a perlish/cpanish place to put such a script.

Cassandane checks this in its default make target, but it actually has things that need building. But it doesn't seem appropriate to handroll a Makefile for a module project that will probably have a Makefile.PL someday.

I'll submit a pull request, I'd just like some guidance on where you'd like such a thing to live. :)

our original todo list, to be broken down

For each datatype - that you can create:

  • with every field you're allowed to specify specified
  • with only the minimum specified. (in both cases, that the values are returned as specified in a get, or with updates as expected by the spec)
  • that the created message ids appear in a getFoosUpdate.
  • if there's a relationship (i.e. parentId) possible, that you can create a few items, in a tree, with backreferences and they all create correctly in the same tree
  • for fields with constraints (including datatypes), that a create which fails those constraints is rejected
  • for each field that is required, that a create which is missing that field is rejected (I guess that's just constraints, right)

For update:

  • that you can reference created things again (create a folder, move existing messages into it)
  • all the constraints stuff above, trying to move things in a way that fails constraints
  • attempting to modify any immutable field fails.
  • updating a non-existent message gives a sane notUpdated response

For delete:

  • deleting a non-existent message gives a sane notUpdated response
  • you can't delete anything by ID that's still referenced as a parentId / mailboxId / whatever by another piece of data.
  • normal delete is fine

For any of the above - make sure they appear in getFoosUpdates between pre and post states.

For container types (Mailboxes, Calendars, Addressbooks) that adding something to the container causes the container to get a new state, updates to the container to show it, and deleting also shows - with a special emphasis on something being deleted entirely causing the state to change and the result to reflect it. This is the QRESYNC side of things - tombstones, and it's one of the most likely sources of bugs.

Ideally a smart test would allow getFoosUpdates to return cannotCalculateUpdates and just flag as "inefficient server but within spec". Calculating updates incorrectly on the other hand, that's a sin. Also a server which returns more updates than expected isn't necessarily wrong - but probably worth noting in the results as "inefficient server" or something.

Basic.t does not include accountId on requests

Hi,

I have started testing our JMAP server with JMAP-TestSuite and I noticed that it does not include the accountId field on requests, for example this is the first request sent by basic.t:

{
  "using": [
    "urn:ietf:params:jmap:core",
    "urn:ietf:params:jmap:mail"
  ],
  "methodCalls": [
    [
      "Email/get",
      {
        "ids": [
          "i00"
        ]
      },
      "e"
    ]
  ]
}

And this is the adapter configuration I am using:

{
  "adapter": "Cyrus",
  "base_uri": "http://localhost:8080",
  "credentials": [
    {
      "accountId": "i01",
      "username": "i01",
      "password": "mypassword"
    }
  ],
  "virtual_domain_enabled": 0
}

Our server has full RFC8620 + RFC8621 support and I would like to test it using Basic Auth for the time being. Which adapter do you recommend I use? Also if you could provide any documentation or guidelines on how to use the test suite it would be really appreciated.

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.