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

Add go-tuf interop test suite #213

Merged
merged 2 commits into from
Nov 21, 2019
Merged

Conversation

erickt
Copy link
Collaborator

@erickt erickt commented Sep 4, 2019

We want to make sure that rust-tuf is compatible with go-tuf, and other TUF implementations. This patch starts that process by importing the [go-tuf] test metadata into the rust-tuf repository in order to make sure rust-tuf can parse the metadata. There are two sets of metadata:

  • go-tuf: what the library currently generates), and
  • go-tuf-transition-M4: what the library will eventually generate once all the patches have landed).

Unfortunately due to a few bugs (#224, #225, and #226), we can't correctly parse all the metadata yet, so this patch just ignores that output for now.

I recommend reviewing each patch individually, which might be easier to review.

@erickt erickt changed the title Add interop test suite (WIP Don't merge) Add go-tuf interop test suite Nov 14, 2019
tests/interop.rs Outdated Show resolved Hide resolved
tests/interop.rs Outdated Show resolved Hide resolved
tests/interop.rs Outdated Show resolved Hide resolved
tests/interop.rs Outdated Show resolved Hide resolved
tests/interop.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ComputerDruid ComputerDruid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have a couple of comments about the metadata organization, the rest of this seems good.

@@ -0,0 +1,19 @@
package main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will build because it'll pull the wrong go-tuf. Instead of leaving this here, maybe point to the commit from upstream that these were taken from? It makes more sense to generate locally and then copy out anyway IMO.

Also, that implies that you should probably call this directory M3, since nothing will keep it in sync with go-tuf's master; all of these directories are snapshots.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

Regarding the name, I think we should also link it to our fork, so I prefixed the directory with fuchsia-. I don't want to use M3 though, since this metadata isn't what we called M3. I instead named this directory fuchsia-go-tuf-HEAD, and called out the specific commit in the README. That sound good?

@@ -0,0 +1,146 @@
package main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having this file, I think it'd make more sense to leave a README here explaining where this metadata came from

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, I removed the go file, added README, and renamed this fuchsia-go-tuf-transition-M4.

@erickt
Copy link
Collaborator Author

erickt commented Nov 21, 2019

Updated with the following changes:

* added READMEs to point at where the metadata came from.
* renamed `go-tuf` metadata to `fuchsia-go-tuf-HEAD`
* renamed `go-tuf-transition-M4` metadata to `fuchsia-go-tuf-transition-M4`

We want to make sure that rust-tuf is compatible with Fuchsia's go-tuf
fork, and eventually other TUF implementations. This patch starts that
process by importing the Fuchsia [go-tuf] test metadata into the
rust-tuf repository in order to make sure rust-tuf can parse the
metadata. There are two sets of metadata:

* go-tuf-5527fe: what the library currently generates.
* go-tuf-transition-M4: what the library will eventually generate once
  all the patches have landed.

In order to ease review, this patch only includes the metadata, and a
separate patch will add the integration test.

[go-tuf]: https://fuchsia.googlesource.com/third_party/go-tuf/+/refs/heads/master/client/testdata/
This adds a test to rust-tuf that verifies it can successfully parse the
fuchsia go-tuf fork's TUF 1.0 metadata. Unfortunately due to theupdateframework#225, we
can't correctly parse all the metadata yet, so this patch just ignores
that output for now.
@erickt erickt merged commit ce2b9c8 into theupdateframework:develop Nov 21, 2019
@erickt erickt deleted the interop branch November 22, 2019 00:09
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.

2 participants