Results matching “PAWS”

Paws XXXV (Well not a wrap but close)

Well it looks like a wrap for Paws S3

I made up my own test creation caller. No rocket science in this one. I just added in a few useful attributes;


has [
    qw(make_response_test
      make_request_test
      warn_response
      warn_request
      )
  ] => (
    is      => 'ro',
    isa     => 'Bool',
    default => 0,
  );

has [
qw(response_test_dir
request_test_dir
)
] => (
is => 'ro',
isa => 'Str',
default => "",
);

Paws XXXIV (Yet more code)

Well after spending a little while trying to create an auto test generator I found the test generator script that came with PAWS.

So I decided to try it out. With only a little fudging of the code internals, no real code changes just changes to libs, I got it to work;

perl script/paws_make_testcase  S3 --region us-east-1 GetBucketLocation Bucket: "dev.cargotel.test"

the test file it generated /0001.response.test.yml;


--
tests:
  - expected: eu-west-2
    op: eq
    path: LocationConstraint

So that is ok. …

Paws XXXIII (A little advice please)

Well some-days it would be nice to get a little advice, without asking for it, before one heads down a very long and in the end futile path.

Today that happened to me when I was starting down a path that I dreaded. Namely creating the 'response' test suite for all those S3 requests I have fixed up over the past few weeks. This type of programming ranges from so mind numbingly dull as to cause your ears to bleed to so incredibility repetitive that you consider that career change to line supervisor at the box factory.

Looking at the prospect of coveting some 70+ working S3 un…

Paws XXXII (80+ paws)

Today's post proves that test suite, even one that uses canned data, requests and responses, is a very valuable asset to have about.

As I was charging though some 80 action calls copying the requests from my successful unit tests into my t/09_request.t test cases I ran into the odd real bug.

The first one I ran into was to do with the 'PutBucketLogging' action; My real unit test case would work with no problem but as I transferred this real world unit test into canned test cases I got a fail on some of the composed XML.

The test parameters for the request where…

Paws XXXI (Digging up more dirt)

I ending up in my last post with a test that was running but most of the tests where failing.

ok 1 - Call S3->CreateBucket from /home/scolesj/aws-sdk-perl/t/09_requests/s3-create-bucket.request
ok 2 - Got content eq from result
…
ok 11 - Got method eq PUT from result
I had a look at the request object I was getting back

 bless( {
                 'url' => 'https://s3.fake_region.amazonaws.com/oneoffpaws',
                 'method' => 'PUT',
                 'content' => '<CreateBucketConfiguration x…

Paws XXX (Three of a kind)

Goodness Paws 30 and I am at least code compete as far as running through all of the different action found on S3. Now that leads me to a very important part.

I now have to do a little bit of back peddling and come up with a test suite for all the now fixed S3 actions. 90% of the bugs and fixes I have done so far on S3 have been for requests to the server not checking responses form the server.

Following on with this it makes sense that I test how things are sent to the server as well. I had a peek about in the test suite and except for a few of the basic actions there ar…

Paws XXIX (Would you like fries with that)

Well still in clean-up mode here in the Paws Pen trying to get the full t/10_response.t test case working.

I was having all sorts of fun with the 'GetBucketPolicy' action test. By fun I mean a good hour of frustration and cursing and gnashing of teeth as my real-time test script was working fine! I just could not get the test in 's3-get-bucket-policy.response.test.yml' to pass.

Then I stumbled on it.

This is the one very odd action on the AWS S3 API where it dose not return XML but returns JSON. Now I do handle this with this code

="prettyp…

Paws XXVIII (Just one More )

Seems I lied in my last post when I said there where no longer any boto changes for my S3 fixes. There is still one call 'GetBucketLocation' that is using a new bit I added to boto
"keep_root":true

I stumbled upon this when I added in a few fixed cases from another branch and when I ran the suite I
got;

ok 10052 - Call S3->GetBucketLocation from t/10_responses/s3-get-bucket-location.response not ok 10053 - Can't test method access because something went horribly wrong in the call to …

Paws XXVII (Templated Paws)



/{Bucket}?action
/{Bucket}?action&id={Id}

where I add the id to the URI to get around a bug/problems when running this code on RestXmlCaller.pm;


$uri->query_form(%$qparams); 

would scramble the URI so the call would fail.

What I would like to do is roll back the changes I have ma…

Paws XXVI (The Big Clean)

So time to hold on a bit and go back and and see if my latest changes have broken anything or for that matter fixed something that was already broken?

So back to my tests script and and I got my first fail on

'PutBucketCors'

and surprise it was a bit of Mooso poop.


You must pass a package name and it cannot be blessed at /wwwveh/lib/x86_64-linux-thread-multi/Moose/Meta/Attribute.pm line 867
        Moose::Meta::Attribute::get_value('Moose::Meta::Class::__ANON__::SERIAL::12=HASH(0x4ad5358)', 'h…
  1 2 3 4 5 6  

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations