GithubHelp home page GithubHelp logo

Comments (6)

lmars avatar lmars commented on August 26, 2024

@Aagat I'm not sure what the issue is here, the tests seem to pass just fine for me:

$ git rev-parse HEAD
a98aea1463c972506e302344ebbfa30f85b74f2f

$ go test ./...
ok      github.com/flynn/go-tuf 1.247s
ok      github.com/flynn/go-tuf/client  6.834s
?       github.com/flynn/go-tuf/cmd/tuf [no test files]
?       github.com/flynn/go-tuf/cmd/tuf-client  [no test files]
ok      github.com/flynn/go-tuf/data    0.012s
ok      github.com/flynn/go-tuf/encrypted       1.024s
?       github.com/flynn/go-tuf/sign    [no test files]
ok      github.com/flynn/go-tuf/util    0.011s
ok      github.com/flynn/go-tuf/verify  0.051s

from go-tuf.

Aagat avatar Aagat commented on August 26, 2024

@lmars That'd odd. I can't even generate required testdata with current HEAD.

» git rev-parse HEAD
a98aea1463c972506e302344ebbfa30f85b74f2

» make clean
rm -rf with{,out}-consistent-snapshot

» make
docker build -t tuf-gen ./generate
Sending build context to Docker daemon   7.68kB
Step 1/7 : FROM ubuntu:trusty
 ---> dc4491992653
Step 2/7 : RUN apt-get update
 ---> Using cache
 ---> 4448229afdc9
Step 3/7 : RUN apt-get install -y python python-dev python-pip libffi-dev tree
 ---> Using cache
 ---> 8c8fa8f6160a
Step 4/7 : RUN apt-get install -y git
 ---> Using cache
 ---> 2a7b539941c6
Step 5/7 : RUN pip install --no-use-wheel git+https://github.com/theupdateframework/tuf.git@develop && pip install tuf[tools]
 ---> Running in b110d38070a2
Downloading/unpacking git+https://github.com/theupdateframework/tuf.git@develop
  Cloning https://github.com/theupdateframework/tuf.git (to develop) to /tmp/pip-CCCf76-build
  Running setup.py (path:/tmp/pip-CCCf76-build/setup.py) egg_info for package from git+https://github.com/theupdateframework/tuf.git@develop
    
    warning: no files found matching '*' under directory 'examples'
    warning: no files found matching '*.pem' under directory 'tests'
    warning: no files found matching '*.gz' under directory 'tests'
    warning: no files found matching '*.gitignore' under directory 'tuf'
    warning: no files found matching '*.rst' under directory 'tuf'
    warning: no files found matching '*.yml' under directory 'tuf'
Downloading/unpacking iso8601>=0.1.12 (from tuf==0.10.2)
  Downloading iso8601-0.1.12.tar.gz
  Running setup.py (path:/tmp/pip_build_root/iso8601/setup.py) egg_info for package iso8601
    
Downloading/unpacking six>=1.11.0 (from tuf==0.10.2)
  Downloading six-1.11.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/six/setup.py) egg_info for package six
    
    no previously-included directories found matching 'documentation/_build'
Downloading/unpacking securesystemslib>=0.10.10 (from tuf==0.10.2)
  Running setup.py (path:/tmp/pip_build_root/securesystemslib/setup.py) egg_info for package securesystemslib
    
Downloading/unpacking cryptography>=2.1.3 (from securesystemslib>=0.10.10->tuf==0.10.2)
  Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
    error in cryptography setup command: Invalid environment marker: python_version < '3'
    Complete output from command python setup.py egg_info:
    error in cryptography setup command: Invalid environment marker: python_version < '3'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log
The command '/bin/sh -c pip install --no-use-wheel git+https://github.com/theupdateframework/tuf.git@develop && pip install tuf[tools]' returned a non-zero code: 1
make: *** [Makefile:2: all] Error 1

Tests then fails as expected because no test repo was generated.

» go test ./...
ok  	github.com/flynn/go-tuf	(cached)

----------------------------------------------------------------------
FAIL: <autogenerated>:1: InteropSuite.TestGoClientPythonGenerated

interop_test.go:48:
    c.Assert(err, IsNil)
... value *os.PathError = &os.PathError{Op:"open", Path:"testdata/with-consistent-snapshot/keystore/root_key.pub", Err:0x2} ("open testdata/with-consistent-snapshot/keystore/root_key.pub: no such file or directory")

OOPS: 31 passed, 1 FAILED
--- FAIL: Test (6.62s)
FAIL
FAIL	github.com/flynn/go-tuf/client	6.629s
?   	github.com/flynn/go-tuf/cmd/tuf	[no test files]
?   	github.com/flynn/go-tuf/cmd/tuf-client	[no test files]
ok  	github.com/flynn/go-tuf/data	(cached)
ok  	github.com/flynn/go-tuf/encrypted	(cached)
?   	github.com/flynn/go-tuf/sign	[no test files]
ok  	github.com/flynn/go-tuf/util	(cached)
ok  	github.com/flynn/go-tuf/verify	(cached)

I'm not sure if I am doing something horribly wrong or you have running it against previously generated tuf repo. Can you confirm if test data generator Docker image is working for you.

from go-tuf.

lmars avatar lmars commented on August 26, 2024

@Aagat I was running them against the committed files yes. I tried the latest Python release and there are a few changes which the Go implementation is not compatible with (for example prefixing a version rather than hash to metadata files in a consistent snapshot).

I've pushed a branch python-compatibility with my fixes so far: https://github.com/flynn/go-tuf/compare/python-compatibility

The InteropSuite.TestGoClientPythonGenerated test is still failing, feel free to try and fix the incompatibilities.

from go-tuf.

Aagat avatar Aagat commented on August 26, 2024

@lmars Thank you for taking time to look into the issue deeper. I will try to a look at these in coming week. For the moment I worked around the issue by using keys generated by go-tuf for testing but I think python interop is very important.

from go-tuf.

mnm678 avatar mnm678 commented on August 26, 2024

cc @hosseinsia

from go-tuf.

rdimitrov avatar rdimitrov commented on August 26, 2024

Closing since the code base changed, but it's also not relevant anymore. The new code base is compliant against the python-tuf implementation.

Thanks for raising this! 👍

from go-tuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.