Re: Writing some tests

Lists: pgsql-www
From: Mac Chaffee <macchaffee88(at)gmail(dot)com>
To: pgsql-www(at)postgresql(dot)org
Subject: Writing some tests
Date: 2017-05-13 03:21:16
Message-ID: CABVsO55QrRFB1_vbFKeT5KGkXacv-vC8rEW91nZtno_6GjJ9Kg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

Hi all,

I'm new to the world of open source projects, but I've been working as a
django developer and proud postgres user for 1 year now.

Would you be interested if I wrote some tests for pgweb?

It would help me familiarize myself with the codebase and it would help you
prevent bugs in the future. The tests could also help ensure stability if
you plan on upgrading to the next LTS release of django (1.11).

Also, what's the normal process for contributing code? Someone in the IRC
mentioned patching, but didn't go into specifics.


From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Mac Chaffee <macchaffee88(at)gmail(dot)com>
Cc: pgsql-www(at)postgresql(dot)org
Subject: Re: Writing some tests
Date: 2017-05-14 08:12:36
Message-ID: EE96AF8C-F76C-4A99-8603-42BC657894E1@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

> On 13 May 2017, at 05:21, Mac Chaffee <macchaffee88(at)gmail(dot)com> wrote:
>
> Hi all,
>
> I'm new to the world of open source projects, but I've been working as a django developer and proud postgres user for 1 year now.
>
> Would you be interested if I wrote some tests for pgweb?
>
> It would help me familiarize myself with the codebase and it would help you prevent bugs in the future. The tests could also help ensure stability if you plan on upgrading to the next LTS release of django (1.11).

While not speaking for anyone but myself, I think that sounds interesting.

> Also, what's the normal process for contributing code? Someone in the IRC mentioned patching, but didn't go into specifics.

For the core database server the process is to start a discussion around the
change on the -hackers mailinglist, submit a patch there and then add it to the
CommitFest app. This process is described in detail at:

https://wiki.postgresql.org/wiki/Submitting_a_Patch

Since the website isn’t following a release schedule like the server (and there
are fewer contributions), the process is a bit different. Generally a patch is
posted to this mailinglist and is discussed here until applied or rejected
without going via the CommitFest app.

Like for the main server, it is however recommended that any larger pieces of
work are discussed on the mailinglist before too much time is invested. For
your idea, perhaps submit a patch with one, or a few, tests and see where the
discussion goes to ensure it’s in line with what the community wants.

Welcome aboard!

cheers ./daniel


From: Mac Chaffee <macchaffee88(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: pgsql-www(at)postgresql(dot)org
Subject: Re: Writing some tests
Date: 2017-05-15 01:40:32
Message-ID: CABVsO56VcZzxD4BBfhZjoNQZD6gd29Y1Us_g50cQD-ScMw5g7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

Thanks for the warm welcome!

> For your idea, perhaps submit a patch with one, or a few, tests and see
where the
> discussion goes to ensure it’s in line with what the community wants.

Here are a few tests I wrote today for the SignupForm. I'm hoping to
eventually cover most of pgweb/account, then maybe pgweb/core or whatever
else the community deems important.

Please let me know if I'm doing anything wrong. I'm here to learn.

On Sun, May 14, 2017 at 4:12 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:

> > On 13 May 2017, at 05:21, Mac Chaffee <macchaffee88(at)gmail(dot)com> wrote:
> >
> > Hi all,
> >
> > I'm new to the world of open source projects, but I've been working as a
> django developer and proud postgres user for 1 year now.
> >
> > Would you be interested if I wrote some tests for pgweb?
> >
> > It would help me familiarize myself with the codebase and it would help
> you prevent bugs in the future. The tests could also help ensure stability
> if you plan on upgrading to the next LTS release of django (1.11).
>
> While not speaking for anyone but myself, I think that sounds interesting.
>
> > Also, what's the normal process for contributing code? Someone in the
> IRC mentioned patching, but didn't go into specifics.
>
> For the core database server the process is to start a discussion around
> the
> change on the -hackers mailinglist, submit a patch there and then add it
> to the
> CommitFest app. This process is described in detail at:
>
> https://wiki.postgresql.org/wiki/Submitting_a_Patch
>
> Since the website isn’t following a release schedule like the server (and
> there
> are fewer contributions), the process is a bit different. Generally a
> patch is
> posted to this mailinglist and is discussed here until applied or rejected
> without going via the CommitFest app.
>
> Like for the main server, it is however recommended that any larger pieces
> of
> work are discussed on the mailinglist before too much time is invested.
> For
> your idea, perhaps submit a patch with one, or a few, tests and see where
> the
> discussion goes to ensure it’s in line with what the community wants.
>
> Welcome aboard!
>
> cheers ./daniel

Attachment Content-Type Size
0001-Add-unit-tests-for-SignupForm.patch application/octet-stream 2.9 KB

From: Mac Chaffee <macchaffee88(at)gmail(dot)com>
To: pgsql-www(at)postgresql(dot)org
Subject: Re: Writing some tests
Date: 2017-05-21 14:08:29
Message-ID: CABVsO57eupcgtaGyaO4T7nHC7mEmA7uYMEMaDhujnfHJfQv+Sg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

I'm looking for some more input on tests like the ones I've re-attached.
Also, which apps do you think are the most important to test?

On Sun, May 14, 2017 at 9:40 PM Mac Chaffee <macchaffee88(at)gmail(dot)com> wrote:

> Thanks for the warm welcome!
>
> > For your idea, perhaps submit a patch with one, or a few, tests and see
> where the
> > discussion goes to ensure it’s in line with what the community wants.
>
> Here are a few tests I wrote today for the SignupForm. I'm hoping to
> eventually cover most of pgweb/account, then maybe pgweb/core or whatever
> else the community deems important.
>
> Please let me know if I'm doing anything wrong. I'm here to learn.
>

Attachment Content-Type Size
0001-Add-unit-tests-for-SignupForm.patch application/octet-stream 2.9 KB

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Mac Chaffee <macchaffee88(at)gmail(dot)com>
Cc: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Writing some tests
Date: 2017-06-05 12:37:14
Message-ID: CABUevExGDMnhabyiwrsuq802958oX87UwOx1z30fR9opbZb4NA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

On Sun, May 21, 2017 at 4:08 PM, Mac Chaffee <macchaffee88(at)gmail(dot)com> wrote:

> I'm looking for some more input on tests like the ones I've re-attached.
> Also, which apps do you think are the most important to test?
>
>
I would say look atthe parts that actually "do something" beyond very
trivial rendering. So primarily:

* authentication system
* docs
* file browser/download

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>