Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to experimental-client #1358

Conversation

jku
Copy link
Member

@jku jku commented Apr 21, 2021

Let's get some new metadata features (from_bytes and is_expired) from develop branch

sechkova and others added 30 commits March 23, 2021 18:16
For compatibility with Windows systems, declare repository_data
files to always have LF line endings on checkout.

A trailing "/**" matches everything inside, with infinite depth.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
…n-setup

Remove additional version settup in Signed
…comment

New API: Fix exception message for version
…pendabot/pip/cryptography-3.4.7

build(deps): bump cryptography from 3.4.6 to 3.4.7
While packaging latest release for debian from pypi tarball
I noticed some tests' files were not shipped, let's add them.

Relate-to: theupdateframework#263
Signed-off-by: Philippe Coval <rzr@users.sf.net>
…zr/review/master

build: Add keys to sdist archive for tests
Runing module from python will help
portability between systems.

Those scripts may be renamed by distros,
for instance Debian provides python3-converage.

Signed-off-by: Philippe Coval <rzr@users.sf.net>
…zr/review/master

test: Start coverage from python module
Signed-off-by: maoyangLiu <liumaoyang@inspur.com>
Remove use of six

Signed-off-by: Velichka Atanasova <avelichka@vmware.com>

Replace the use of dict.items(mydict) with mydict.items(), dict.keys(mydict) with mydict.keys() and dict.values(mydict) with mydict.values()

Signed-off-by: Velichka Atanasova <avelichka@vmware.com>

Replace 'import urllib' and 'import urllib.x' with 'from urllib import x' for vendor compatibility

Signed-off-by: Velichka Atanasova <avelichka@vmware.com>
Signed-off-by: Kainaat Singh <kainaatsingh93@gmail.com>

remove unwanted lines
Make sure test server processes are killed before the temporary
directories are removed.

Let Modified_Testcase handle the top-level temporary directory.
Don't let Modified_testcase handle any subdirectories because:
 * teardown will try to remove them in the wrong order
 * removing the top level is enough

Fixes theupdateframework#1344

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
Call the parent (Modified_Testcase) tearDown as the last thing in
tearDown(). This is good practice anyway and in practice may prevent
bugs where the instance needs to cleanup something before
Modified_Testcase removes the temp dir.

In practice there does not seem to be visible bugs in these tests
(as the all have top level temp directory handling in tearDownClass())

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
These tests seem to try to remove temp files before the processes
using those files had stopped. This likely lead to an error (and
dangling temp files) on Windows, but Modified_Testcase hides the error

Make sure temp directories are removed as the last thing in teardown.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
fix the outdate link in docs/tuf-spec.0.9.txt
Can be useful to run tests using distro runtimes,
(like python3 on Debian).

Relate-to: theupdateframework#263
Origin: https://salsa.debian.org/rzr/python-tuf/-/tree/debian/review/master
Forwarded: theupdateframework#1337
Signed-off-by: Philippe Coval <rzr@users.sf.net>
…zr/review/master

tests: Use current python interpreter for sub tests
Checks metadata expiration against a reference time (a naive datetime in UTC).
If not provided, checks against the current UTC date and time.
Returns True if expiration time is less than the reference time.

Signed-off-by: Velichka Atanasova <avelichka@vmware.com>
Even though, this ADR documents something already implied in the TUF
spec in [document formats](https://theupdateframework.github.io/specification/latest/#document-formats)
it seems better to document this decision clearly so that it could be
referenced and give an explanation why someone can load a metadata file
with additional unrecognized fields.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Add a method of Signed metadata class returning information about metadata expiration
Document ADR 0008 about unrecognized fields
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Jussi Kukkonen added 3 commits April 21, 2021 09:36
This is essentially short-hand for
    JSONDeserializer().deserialize(data)
but seems much easier for the API user so may be worth it.

Metadata.from_file() now uses Metadata.from_bytes() internally.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
@jku jku requested a review from sechkova April 21, 2021 12:56
@jku jku merged commit 2b0324e into theupdateframework:experimental-client Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants