Skip to content

Commit

Permalink
Update interop tests for new python-tuf release 2.0.0
Browse files Browse the repository at this point in the history
Simply re-ran the generation scripts with the newest python-tuf release,
renamed the directory to reflect the updated version and updated any
references to the directory.

Fixes #367

Signed-off-by: Joshua Lock <[email protected]>
  • Loading branch information
joshuagl committed Nov 15, 2022
1 parent 901213d commit c5026b9
Show file tree
Hide file tree
Showing 25 changed files with 229 additions and 237 deletions.
6 changes: 3 additions & 3 deletions client/python_interop/python_interop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (InteropSuite) TestGoClientPythonGenerated(c *C) {
// start file server
cwd, err := os.Getwd()
c.Assert(err, IsNil)
testDataDir := filepath.Join(cwd, "testdata", "python-tuf-v1.0.0")
testDataDir := filepath.Join(cwd, "testdata", "python-tuf-v2.0.0")
addr, cleanup := startFileServer(c, testDataDir)
defer cleanup()

Expand Down Expand Up @@ -145,7 +145,7 @@ func (InteropSuite) TestPythonClientGoGenerated(c *C) {
c.Assert(os.WriteFile(filepath.Join(currDir, "root.json"), rootJSON, 0644), IsNil)

args := []string{
filepath.Join(cwd, "testdata", "python-tuf-v1.0.0", "client.py"),
filepath.Join(cwd, "testdata", "python-tuf-v2.0.0", "client.py"),
"--repo=http://" + addr + "/" + name,
}
for path := range files {
Expand Down Expand Up @@ -204,7 +204,7 @@ func (InteropSuite) TestPythonClientGoGeneratedNullDelegations(c *C) {
c.Assert(os.WriteFile(filepath.Join(currDir, "root.json"), rootJSON, 0644), IsNil)

args := []string{
filepath.Join(cwd, "testdata", "python-tuf-v1.0.0", "client.py"),
filepath.Join(cwd, "testdata", "python-tuf-v2.0.0", "client.py"),
"--repo=http://" + addr + "/" + name,
}
for path := range files {
Expand Down
2 changes: 1 addition & 1 deletion client/python_interop/testdata/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PYTHON_TUF=python-tuf-v1.0.0
PYTHON_TUF=python-tuf-v2.0.0

all:
docker build -t tuf-gen ./$(PYTHON_TUF)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.10

RUN apt-get update && apt-get install -y libsodium-dev tree
RUN pip install 'securesystemslib[crypto,pynacl]==0.22.0' 'tuf==v1.0.0'
RUN pip install -U pip && pip install 'securesystemslib[crypto,pynacl]==0.25.0' 'tuf==v2.0.0'

ADD generate.py generate.sh /
CMD /generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"signatures": [
{
"keyid": "7e576308aa26b10a124e13fd6bc4d63977d1904db6823c2862636d2b330fd669",
"sig": "c50fb9e20819b06d8dbebc748a269f1b9e089a2d8a81f64f7e889c054e619ec22c98e4ae24cb868b7c7757f62853cb0cd5dd658dad5ba94286a34255f5f7a100"
}
],
"signed": {
"_type": "root",
"consistent_snapshot": true,
"expires": "2030-01-01T00:00:00Z",
"keys": {
"7e576308aa26b10a124e13fd6bc4d63977d1904db6823c2862636d2b330fd669": {
"keytype": "ed25519",
"keyval": {
"public": "018908d2190610e54be1f6af0c77a7f59efc5b42971575a06e66018ae36bf15c"
},
"scheme": "ed25519"
},
"e76b314161b74584dbda0b3e46eaf1b9feea6f85abc0d9c8432e7fe3752d4f0f": {
"keytype": "ed25519",
"keyval": {
"public": "ecfe22e7fb9c2d867bad321ce90f297d5747efce8d96af171b5d5801b13a1c72"
},
"scheme": "ed25519"
},
"fa5b604a0ee5980e5f8a2398729e03c539fa68123cd3eb2e99f70d3504a71704": {
"keytype": "ed25519",
"keyval": {
"public": "128d5aba7c967e6e87c4e06b852282c91dd90c9ac9dec3adc9e6a237d4530752"
},
"scheme": "ed25519"
},
"faf425a6c41e594be56b35ab08c0dfe486ab6e14a25308bbfa990e050cdf0aef": {
"keytype": "ed25519",
"keyval": {
"public": "2a70c65b98f325026225b568af3587e993a0a5ab96671469e4ecfbb386412063"
},
"scheme": "ed25519"
}
},
"roles": {
"root": {
"keyids": [
"7e576308aa26b10a124e13fd6bc4d63977d1904db6823c2862636d2b330fd669"
],
"threshold": 1
},
"snapshot": {
"keyids": [
"fa5b604a0ee5980e5f8a2398729e03c539fa68123cd3eb2e99f70d3504a71704"
],
"threshold": 1
},
"targets": {
"keyids": [
"faf425a6c41e594be56b35ab08c0dfe486ab6e14a25308bbfa990e050cdf0aef"
],
"threshold": 1
},
"timestamp": {
"keyids": [
"e76b314161b74584dbda0b3e46eaf1b9feea6f85abc0d9c8432e7fe3752d4f0f"
],
"threshold": 1
}
},
"spec_version": "1.0.19",
"version": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"signatures": [
{
"keyid": "fa5b604a0ee5980e5f8a2398729e03c539fa68123cd3eb2e99f70d3504a71704",
"sig": "1c09c1ca4c38e68f4ba9ac48c6ed6fcee13e5a071dcfeb51e7b5cf1a823bcc16b26528f67efaa59383a4a765cdd5fd81d67f74a5c09789673cab164a7251b20d"
}
],
"signed": {
"_type": "snapshot",
"expires": "2030-01-01T00:00:00Z",
"meta": {
"targets.json": {
"version": 1
}
},
"spec_version": "1.0.19",
"version": 1
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"signatures": [
{
"keyid": "7b1aa7dbc1b24fb44d0146b0fe726d92f9640e26dc197d50345f9b00e0c98c4a",
"sig": "012a5a56af043b44fb913d859b61f85800c72fd93b5b3a04ac20f988c29114c643e933f427ff4d38b29b5b2340fe76cfa05704e075d799431fbafe80f9733500"
"keyid": "faf425a6c41e594be56b35ab08c0dfe486ab6e14a25308bbfa990e050cdf0aef",
"sig": "42e49b11e043fa847b0f82786d5fb44988ab0281bda02553e54eb95d7fdbeea25b95c81b824c900cf6132d4714d3ad4d88786155d915603859d27c7934d5650f"
}
],
"signed": {
Expand Down
Loading

0 comments on commit c5026b9

Please sign in to comment.