~hloeung/content-cache-charm:local-site-content

Last commit made on 2019-04-15
Get this branch:
git clone -b local-site-content https://git.launchpad.net/~hloeung/content-cache-charm
Only Haw Loeung can upload to this branch. If you are Haw Loeung please log in for upload directions.

Branch merges

Branch information

Name:
local-site-content
Repository:
lp:~hloeung/content-cache-charm

Recent commits

c5fcf00... by Haw Loeung

Allow multiple locations and custom configs for each location

fa71401... by Haw Loeung

Add ability to serve local site content

Reviewed-on: https://code.launchpad.net/~hloeung/content-cache-charm/+git/content-cache-charm/+merge/366042
Reviewed-by: Joel Sing <email address hidden>

44b2d8d... by Haw Loeung

Fixed based on review

d99530a... by Haw Loeung

Sort

07b7a79... by Haw Loeung

Try make it clear full path to local content we're serving

745a579... by Haw Loeung

root is not really local path as it's still /$root/$location. Also fixed fixed Nginx off-by-slash vulnerability.

2820c63... by Haw Loeung

Add ability to serve local site content

30cb4af... by Haw Loeung

Set timezone for unit tests for freezegun

freezegun's tz_offset still uses the local timezone on host and then calculates the offset based on that. We need to export TZ=UTC instead.

| [hloeung@dharkan tmp]$ python3
| Python 3.6.7 (default, Oct 22 2018, 11:32:17)
| [GCC 8.2.0] on linux
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import datetime
| >>> import freezegun
| >>> @freezegun.freeze_time("2019-03-22", tz_offset=0)
| ... def time_offset():
| ... return datetime.datetime.now().timestamp()
| ...
| >>> print(time_offset())
| 1553173200.0
| >>>

| [hloeung@dharkan tmp]$ export TZ=UTC
| [hloeung@dharkan tmp]$ python3
| Python 3.6.7 (default, Oct 22 2018, 11:32:17)
| [GCC 8.2.0] on linux
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import datetime
| >>> import freezegun
| >>> @freezegun.freeze_time("2019-03-22", tz_offset=0)
| ... def time_offset():
| ... return datetime.datetime.now().timestamp()
| ...
| >>> print(time_offset())
| 1553212800.0
| >>>

Reviewed-on: https://code.launchpad.net/~hloeung/content-cache-charm/+git/content-cache-charm/+merge/365983
Reviewed-by: Nick Moffitt <email address hidden>

17b6f26... by Haw Loeung

Set timezone for unit tests for freezegun

f9ea693... by Nick Moffitt

Apply workaround for https://github.com/cmars/nrpe-external-master-interface/issues/12

Reviewed-on: https://code.launchpad.net/~nick-moffitt/content-cache-charm/+git/content-cache-charm/+merge/365527
Reviewed-by: Stuart Bishop <email address hidden>