Details

    • Testing Instructions:
      Hide

      Test pre-requisites

      • Moodle set-up on HTTPS (required for Box.net OAuth)
      • A box.net account
      • A box.net API key and OAuth keys
      • Some files (images, zip, etc...), include at least a very large non-image file (100MB is enough)

      Test 1

      Please make sure to pick references (alias/shortcut) when stated!

      Part 1

      1. Create a fresh install, older than this patch (last weekly for instance)
      2. Enable and configure the repository with your API key
      3. Go to your private files and pick a non-image file using alias/shortcut (reference), call it A
        • Make sure downloading the file works
      4. Create a new file resource, and pick ANOTHER non-image file as reference, call it B
        • Make sure you can access the file
      5. Create a new blog post, and import an image as a reference from Box.net in TinyMCE, call it C
        • Make sure it displays correctly in the post
      6. Create another file resource, and a reference from A (in your private files), call it D
        • Make sure you can access the file fine
      7. Create yet another file resource and pick a non-image LARGE file as reference, call it E
      8. Create a folder F that holds a reference to A, B, D (pick from Private files and Server files)
        • Additionally, pick 10 times your LARGE file as a reference of E.

      Part 2

      1. Upgrade Moodle to the latest.
        • Make sure that the repository is "Enabled but hidden" (see Manage repositories)
        • Make sure there is no more 'boxnet%' preferences in mdl_user_preferences
        • Make sure the admin received an email about the migration issues
      2. Run the following SQL query:

        update mdl_files set referencelastsync = 0; -- Ignore that for master.
        update mdl_files_reference set lastsync = 0;
        

      3. Go to your private files and make sure you CANNOT pick any file from Box.net from your Private files
      4. Update the repository settings
        • Enter your Client ID and Secret
        • Make sure you see a notice advising your to run the migration tool
      5. Go to your privates files and make sure you can pick a file from Box.net (but not as a reference)
      6. Make sure:
        • the file A in your private files is still accessible
        • the file B is still accessible
        • the image in your blog post is still visible (C)
        • the file D is still accessible
        • the file E is still accessible

      Part 3

      A file is no more a reference when the little shortcut icon has disappeared. Use the "Manage files" tool to check TinyMCE content.

      1. Run the CLI migration tool repository/boxnet/cli/migrationv1.php
      2. Make sure there doesn't seem to be any problem
        • You should see 18x "File using reference converted to local file (id: N)"
        • You should notice that the big file is downloaded once only (1 long wait + 10 instant migrations)
      3. Coming back to the files you had as reference before, make sure:
        • the file A in your private files is still accessible, and not a reference any more
        • the file B is still accessible, and not a reference any more
        • the image in your blog post is still visible (C), and not a reference any more
        • the file D is still accessible, and not a reference any more
        • the file E is still accessible, and not a reference any more
        • The files in the Folder F are all accessible, and not references
      4. Run the migration tool again, and make sure nothing is done.

      Part 4

      I'm sorry about that one...

      1. Repeat the entire Test 1, but use the Web migration tool instead. (repository/boxnet/migrationv1.php)

      Test 2

      1. Create a fresh install
      2. Enable the repository Box.net and set the Client ID and secret
        • Make sure you are not advised to run the migration tool on the config page
      3. Go to your private files
        • Make sure you CANNOT pick a reference (alias/shortcut)
        • Make sure you can pick a normal file, and it's downloaded correctly
      4. Create a new URL resource
      5. Pick a URL from Box.net file (use file picker)
        • Make sure you can access the file and preview it online
        • Make sure you do not need to be logged in into your Box.net account to access the link
      6. Run the migration tool boxnetapiv1migration
        • Make sure the CLI runs correctly, without updating anything
        • Make sure the web CLI runs correctly, it should give the same results

      Test 3

      This test only applies once, not to all supported versions.

      1. Install an old 2.4 (before this patch)
      2. Set up your box.net repository (enabled, set api key, ...)
      3. Upgrade to the latest 2.4
      4. Make sure the admin received an email
      5. Set up your repository with random client ID and secret
      6. Upgrade to the latest 2.5
      7. Make sure the admin didn't receive any email
      8. Upgrade to the latest 2.6
      9. Make sure the admin didn't receive any email
      Show
      Test pre-requisites Moodle set-up on HTTPS (required for Box.net OAuth) A box.net account A box.net API key and OAuth keys Some files (images, zip, etc...), include at least a very large non-image file (100MB is enough) Test 1 Please make sure to pick references (alias/shortcut) when stated! Part 1 Create a fresh install, older than this patch (last weekly for instance) Enable and configure the repository with your API key Go to your private files and pick a non-image file using alias/shortcut (reference), call it A Make sure downloading the file works Create a new file resource, and pick ANOTHER non-image file as reference, call it B Make sure you can access the file Create a new blog post, and import an image as a reference from Box.net in TinyMCE, call it C Make sure it displays correctly in the post Create another file resource, and a reference from A (in your private files), call it D Make sure you can access the file fine Create yet another file resource and pick a non-image LARGE file as reference, call it E Create a folder F that holds a reference to A, B, D (pick from Private files and Server files) Additionally, pick 10 times your LARGE file as a reference of E. Part 2 Upgrade Moodle to the latest. Make sure that the repository is "Enabled but hidden" (see Manage repositories) Make sure there is no more 'boxnet%' preferences in mdl_user_preferences Make sure the admin received an email about the migration issues Run the following SQL query: update mdl_files set referencelastsync = 0; -- Ignore that for master. update mdl_files_reference set lastsync = 0; Go to your private files and make sure you CANNOT pick any file from Box.net from your Private files Update the repository settings Enter your Client ID and Secret Make sure you see a notice advising your to run the migration tool Go to your privates files and make sure you can pick a file from Box.net (but not as a reference) Make sure : the file A in your private files is still accessible the file B is still accessible the image in your blog post is still visible (C) the file D is still accessible the file E is still accessible Part 3 A file is no more a reference when the little shortcut icon has disappeared. Use the "Manage files" tool to check TinyMCE content. Run the CLI migration tool repository/boxnet/cli/migrationv1.php Make sure there doesn't seem to be any problem You should see 18x "File using reference converted to local file (id: N)" You should notice that the big file is downloaded once only (1 long wait + 10 instant migrations) Coming back to the files you had as reference before, make sure : the file A in your private files is still accessible, and not a reference any more the file B is still accessible, and not a reference any more the image in your blog post is still visible (C), and not a reference any more the file D is still accessible, and not a reference any more the file E is still accessible, and not a reference any more The files in the Folder F are all accessible, and not references Run the migration tool again, and make sure nothing is done. Part 4 I'm sorry about that one... Repeat the entire Test 1, but use the Web migration tool instead. (repository/boxnet/migrationv1.php) Test 2 Create a fresh install Enable the repository Box.net and set the Client ID and secret Make sure you are not advised to run the migration tool on the config page Go to your private files Make sure you CANNOT pick a reference (alias/shortcut) Make sure you can pick a normal file, and it's downloaded correctly Create a new URL resource Pick a URL from Box.net file (use file picker) Make sure you can access the file and preview it online Make sure you do not need to be logged in into your Box.net account to access the link Run the migration tool boxnetapiv1migration Make sure the CLI runs correctly, without updating anything Make sure the web CLI runs correctly, it should give the same results Test 3 This test only applies once, not to all supported versions. Install an old 2.4 (before this patch) Set up your box.net repository (enabled, set api key, ...) Upgrade to the latest 2.4 Make sure the admin received an email Set up your repository with random client ID and secret Upgrade to the latest 2.5 Make sure the admin didn't receive any email Upgrade to the latest 2.6 Make sure the admin didn't receive any email
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-42666-master

      Description

      Update repository_boxnet to use API v2.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13