FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19030&edit=1

ID: 19030
Updated by: danielc@analysisandsolutions.com
Reported By: danielc at analysisandsolutions dot com
Summary: running test suite modifies data/IS_postcodes.txt
(for PEAR QA team)
Status: Open
Type: Bug
Package: Validate
Package Version: SVN
PHP Version: 5.4.0alpha1
Roadmap Versions:
New Comment:

Can you please take a look at this so we can improve the continuous
integration systems for PEAR and PHP?


Previous Comments:
------------------------------------------------------------------------

[2011-11-14 21:02:54] danielc

Added #patch
bug:19030;patch:the-data-that-gets-modified.diff;revision:1321304574;.

------------------------------------------------------------------------

[2011-11-14 20:59:02] danielc

Description:
------------
Hi:

Executing the test suite winds up modifying the data/IS_postcodes.txt
file.

Thanks,

--Dan

------------------------------------------------------------------------

Search Discussions

  • Daniel Oconnor at Dec 10, 2011 at 2:15 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19030&edit=1

    ID: 19030
    Updated by: daniel.oconnor@gmail.com
    Reported By: danielc at analysisandsolutions dot com
    Summary: running test suite modifies data/IS_postcodes.txt
    (for PEAR QA team)
    Status: Open
    Type: Bug
    -Package: Validate
    +Package: Validate_IS
    Package Version: SVN
    PHP Version: 5.4.0alpha1
    Roadmap Versions:
    New Comment:

    -Package: Validate
    +Package: Validate_IS



    Previous Comments:
    ------------------------------------------------------------------------

    [2011-12-07 04:34:14] danielc

    Can you please take a look at this so we can improve the continuous
    integration systems for PEAR and PHP?

    ------------------------------------------------------------------------

    [2011-11-14 21:02:54] danielc

    Added #patch
    bug:19030;patch:the-data-that-gets-modified.diff;revision:1321304574;.

    ------------------------------------------------------------------------

    [2011-11-14 20:59:02] danielc

    Description:
    ------------
    Hi:

    Executing the test suite winds up modifying the data/IS_postcodes.txt
    file.

    Thanks,

    --Dan

    ------------------------------------------------------------------------
  • Daniel Oconnor at Dec 10, 2011 at 12:32 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19030&edit=1

    ID: 19030
    Updated by: daniel.oconnor@gmail.com
    Reported By: danielc at analysisandsolutions dot com
    Summary: running test suite modifies data/IS_postcodes.txt
    (for PEAR QA team)
    -Status: Open
    +Status: Feedback
    Type: Bug
    Package: Validate_IS
    PHP Version: 5.4.0alpha1
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Feedback
    Thank you for taking the time to report a problem with the package.
    This problem may have been already fixed by a previous change that
    is in the SVN of the package. Please checking out the SVN
    repository of this package and upgrade

    svn checkout svn.php.net/repository/pear/packages/Validate_IS/trunk
    pear upgrade package2.xml

    or

    pear upgrade package.xml

    If you are able to reproduce the bug with the latest SVN,
    please change the status back to "Open".
    Again, thank you for your continued support of PEAR.

    Uhm...
    https://github.com/pear/Validate_IS/blob/master/data/IS_postcodes.txt#L136

    looks like it's already here?


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-12-10 03:15:17] doconnor

    -Package: Validate
    +Package: Validate_IS


    ------------------------------------------------------------------------

    [2011-12-07 04:34:14] danielc

    Can you please take a look at this so we can improve the continuous
    integration systems for PEAR and PHP?

    ------------------------------------------------------------------------

    [2011-11-14 21:02:54] danielc

    Added #patch
    bug:19030;patch:the-data-that-gets-modified.diff;revision:1321304574;.

    ------------------------------------------------------------------------

    [2011-11-14 20:59:02] danielc

    Description:
    ------------
    Hi:

    Executing the test suite winds up modifying the data/IS_postcodes.txt
    file.

    Thanks,

    --Dan

    ------------------------------------------------------------------------
  • Danielc at Dec 10, 2011 at 2:08 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19030&edit=1

    ID: 19030
    Updated by: danielc@analysisandsolutions.com
    Reported By: danielc at analysisandsolutions dot com
    Summary: running test suite modifies data/IS_postcodes.txt
    (for PEAR QA team)
    Status: Feedback
    Type: Bug
    Package: Validate_IS
    PHP Version: 5.4.0alpha1
    Roadmap Versions:
    New Comment:

    The data is in there from the move to GitHub. But that's not the
    problem.

    Tthe postalCode() method has the capability to retrieve live data from
    the Icelandic postal service's website. The "Test postalCode strong"
    section of validate_IS.phpt uses that functionality and writing the
    output to data/IS_postcodes.txt. Having the test suite modifying the
    data feels very wrong to me.

    First, it prevents non-root users from running the test suite on the
    installed package because they won't have write privileges on the data
    directory.

    Second, changing the file can cause the test suite to think everything
    is okay because it's giving the data it wants to find. And since the
    test passes, there is no indication that the original data file needs to
    be committed and put into a release for public consumption.


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-12-10 13:32:20] doconnor

    -Status: Open
    +Status: Feedback
    Thank you for taking the time to report a problem with the package.
    This problem may have been already fixed by a previous change that
    is in the SVN of the package. Please checking out the SVN
    repository of this package and upgrade

    svn checkout svn.php.net/repository/pear/packages/Validate_IS/trunk
    pear upgrade package2.xml

    or

    pear upgrade package.xml

    If you are able to reproduce the bug with the latest SVN,
    please change the status back to "Open".
    Again, thank you for your continued support of PEAR.

    Uhm...
    https://github.com/pear/Validate_IS/blob/master/data/IS_postcodes.txt#L136

    looks like it's already here?

    ------------------------------------------------------------------------

    [2011-12-10 03:15:17] doconnor

    -Package: Validate
    +Package: Validate_IS


    ------------------------------------------------------------------------

    [2011-12-07 04:34:14] danielc

    Can you please take a look at this so we can improve the continuous
    integration systems for PEAR and PHP?

    ------------------------------------------------------------------------

    [2011-11-14 21:02:54] danielc

    Added #patch
    bug:19030;patch:the-data-that-gets-modified.diff;revision:1321304574;.

    ------------------------------------------------------------------------

    [2011-11-14 20:59:02] danielc

    Description:
    ------------
    Hi:

    Executing the test suite winds up modifying the data/IS_postcodes.txt
    file.

    Thanks,

    --Dan

    ------------------------------------------------------------------------
  • Danielc at Dec 10, 2011 at 2:09 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19030&edit=1

    ID: 19030
    Updated by: danielc@analysisandsolutions.com
    Reported By: danielc at analysisandsolutions dot com
    Summary: running test suite modifies data/IS_postcodes.txt
    (for PEAR QA team)
    -Status: Feedback
    +Status: Open
    Type: Bug
    Package: Validate_IS
    PHP Version: 5.4.0alpha1
    Roadmap Versions:
    New Comment:

    -Status: Feedback
    +Status: Open



    Previous Comments:
    ------------------------------------------------------------------------

    [2011-12-10 15:08:43] danielc

    The data is in there from the move to GitHub. But that's not the
    problem.

    Tthe postalCode() method has the capability to retrieve live data from
    the Icelandic postal service's website. The "Test postalCode strong"
    section of validate_IS.phpt uses that functionality and writing the
    output to data/IS_postcodes.txt. Having the test suite modifying the
    data feels very wrong to me.

    First, it prevents non-root users from running the test suite on the
    installed package because they won't have write privileges on the data
    directory.

    Second, changing the file can cause the test suite to think everything
    is okay because it's giving the data it wants to find. And since the
    test passes, there is no indication that the original data file needs to
    be committed and put into a release for public consumption.

    ------------------------------------------------------------------------

    [2011-12-10 13:32:20] doconnor

    -Status: Open
    +Status: Feedback
    Thank you for taking the time to report a problem with the package.
    This problem may have been already fixed by a previous change that
    is in the SVN of the package. Please checking out the SVN
    repository of this package and upgrade

    svn checkout svn.php.net/repository/pear/packages/Validate_IS/trunk
    pear upgrade package2.xml

    or

    pear upgrade package.xml

    If you are able to reproduce the bug with the latest SVN,
    please change the status back to "Open".
    Again, thank you for your continued support of PEAR.

    Uhm...
    https://github.com/pear/Validate_IS/blob/master/data/IS_postcodes.txt#L136

    looks like it's already here?

    ------------------------------------------------------------------------

    [2011-12-10 03:15:17] doconnor

    -Package: Validate
    +Package: Validate_IS


    ------------------------------------------------------------------------

    [2011-12-07 04:34:14] danielc

    Can you please take a look at this so we can improve the continuous
    integration systems for PEAR and PHP?

    ------------------------------------------------------------------------

    [2011-11-14 21:02:54] danielc

    Added #patch
    bug:19030;patch:the-data-that-gets-modified.diff;revision:1321304574;.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=19030
  • Bjori at Dec 10, 2011 at 3:28 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19030&edit=1

    ID: 19030
    Updated by: bjori@php.net
    Reported By: danielc at analysisandsolutions dot com
    Summary: running test suite modifies data/IS_postcodes.txt
    (for PEAR QA team)
    Status: Open
    Type: Bug
    Package: Validate_IS
    PHP Version: 5.4.0alpha1
    Roadmap Versions:
    New Comment:

    Well.. how would you update the test to test the strong method without
    doing the on-
    the-fly update?

    I do agree that a unittest shouldn't modify data files, but the whole
    point with that
    argument is to do live check and update the dataset.


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-12-10 15:09:10] danielc

    -Status: Feedback
    +Status: Open


    ------------------------------------------------------------------------

    [2011-12-10 15:08:43] danielc

    The data is in there from the move to GitHub. But that's not the
    problem.

    Tthe postalCode() method has the capability to retrieve live data from
    the Icelandic postal service's website. The "Test postalCode strong"
    section of validate_IS.phpt uses that functionality and writing the
    output to data/IS_postcodes.txt. Having the test suite modifying the
    data feels very wrong to me.

    First, it prevents non-root users from running the test suite on the
    installed package because they won't have write privileges on the data
    directory.

    Second, changing the file can cause the test suite to think everything
    is okay because it's giving the data it wants to find. And since the
    test passes, there is no indication that the original data file needs to
    be committed and put into a release for public consumption.

    ------------------------------------------------------------------------

    [2011-12-10 13:32:20] doconnor

    -Status: Open
    +Status: Feedback
    Thank you for taking the time to report a problem with the package.
    This problem may have been already fixed by a previous change that
    is in the SVN of the package. Please checking out the SVN
    repository of this package and upgrade

    svn checkout svn.php.net/repository/pear/packages/Validate_IS/trunk
    pear upgrade package2.xml

    or

    pear upgrade package.xml

    If you are able to reproduce the bug with the latest SVN,
    please change the status back to "Open".
    Again, thank you for your continued support of PEAR.

    Uhm...
    https://github.com/pear/Validate_IS/blob/master/data/IS_postcodes.txt#L136

    looks like it's already here?

    ------------------------------------------------------------------------

    [2011-12-10 03:15:17] doconnor

    -Package: Validate
    +Package: Validate_IS


    ------------------------------------------------------------------------

    [2011-12-07 04:34:14] danielc

    Can you please take a look at this so we can improve the continuous
    integration systems for PEAR and PHP?

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=19030
  • Danielc at Dec 10, 2011 at 3:32 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19030&edit=1

    ID: 19030
    Updated by: danielc@analysisandsolutions.com
    Reported By: danielc at analysisandsolutions dot com
    Summary: running test suite modifies data/IS_postcodes.txt
    (for PEAR QA team)
    Status: Open
    Type: Bug
    Package: Validate_IS
    PHP Version: 5.4.0alpha1
    Roadmap Versions:
    New Comment:

    How about having the "strong" test write to a temporary file?


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-12-10 16:28:14] bjori

    Well.. how would you update the test to test the strong method without
    doing the on-
    the-fly update?

    I do agree that a unittest shouldn't modify data files, but the whole
    point with that
    argument is to do live check and update the dataset.

    ------------------------------------------------------------------------

    [2011-12-10 15:09:10] danielc

    -Status: Feedback
    +Status: Open


    ------------------------------------------------------------------------

    [2011-12-10 15:08:43] danielc

    The data is in there from the move to GitHub. But that's not the
    problem.

    Tthe postalCode() method has the capability to retrieve live data from
    the Icelandic postal service's website. The "Test postalCode strong"
    section of validate_IS.phpt uses that functionality and writing the
    output to data/IS_postcodes.txt. Having the test suite modifying the
    data feels very wrong to me.

    First, it prevents non-root users from running the test suite on the
    installed package because they won't have write privileges on the data
    directory.

    Second, changing the file can cause the test suite to think everything
    is okay because it's giving the data it wants to find. And since the
    test passes, there is no indication that the original data file needs to
    be committed and put into a release for public consumption.

    ------------------------------------------------------------------------

    [2011-12-10 13:32:20] doconnor

    -Status: Open
    +Status: Feedback
    Thank you for taking the time to report a problem with the package.
    This problem may have been already fixed by a previous change that
    is in the SVN of the package. Please checking out the SVN
    repository of this package and upgrade

    svn checkout svn.php.net/repository/pear/packages/Validate_IS/trunk
    pear upgrade package2.xml

    or

    pear upgrade package.xml

    If you are able to reproduce the bug with the latest SVN,
    please change the status back to "Open".
    Again, thank you for your continued support of PEAR.

    Uhm...
    https://github.com/pear/Validate_IS/blob/master/data/IS_postcodes.txt#L136

    looks like it's already here?

    ------------------------------------------------------------------------

    [2011-12-10 03:15:17] doconnor

    -Package: Validate
    +Package: Validate_IS


    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=19030

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 7, '11 at 3:34a
activeDec 10, '11 at 3:32p
posts7
users3
websitepear.php.net

3 users in discussion

Danielc: 4 posts Daniel Oconnor: 2 posts Bjori: 1 post

People

Translate

site design / logo © 2021 Grokbase