← Back to team overview

launchpad-dev team mailing list archive

Re: warning: we will soon have much noise in the test results...

 

On Wed, 21 Jul 2010 18:54:50 +0200, Abel Deuring <abel.deuring@xxxxxxxxxxxxx> wrote:
> The branch lp:~adeuring/launchpad/security-guarded-test-object-factory-1
> is at present in ec2 and will land soon.
> 
> Its main change affects LaunchpadObjectFactory: This class has at
> present ca 20 makeWhatever() methods which return objects without a
> security proxy. If this happens, LaunchpadObjectFactory will now print a
> warning.
> 
> I intend to land further branches where the affected methods will
> changed so that they return security proxied objects. This will in turn
> cause a larger number of test failures.
> 
> As a simple fix/workaround, I added a function
> remove_security_proxy_and_shout_at_engineer(obj) which just returns
> removeSecurityProxy(obj) but it also prints a warning to stderr.
> 
> Properly fixing all tests would take far too much time -- and after all,
> the test behaviour will be the same as before. The only difference is
> that we will clearly see where our tests work with "bad" objects.

Hi,

Just a couple of observations as I got some of this in my tests. I
realise things may be changing, but I wanted to record them as I found
them.

  PLEASE FIX: LaunchpadObjectFactory.getAnyPocket returns an unproxied
  object.

  - This returns an enum value, which I don't think can be proxied?

  PLEASE FIX: LaunchpadObjectFactory.makeSourcePackagePublishingHistory
  returns an unproxied object.

  - This does

        # SPPH and SSPPH IDs are the same, since they are SPPH is an SQLVIEW
        # of SSPPH and other useful attributes.
        return SourcePackagePublishingHistory.get(sspph.id)

    what would be the way to get a proxied object if that is what we
    want?

Thanks,

James



Follow ups

References