transparency-dev / trillian-tessera

Go library for building tile-based transparency logs (tlogs)
Apache License 2.0
11 stars 11 forks source link

Add POSIX integration test #189

Closed roger2hk closed 2 months ago

roger2hk commented 2 months ago

Note that the HTTP client timeout is bumped to 60 seconds to avoid timeout from posix integration test.

roger2hk commented 2 months ago

There is some problem with the checkpoint fetch but the problem goes away when the log size is larger than 2048.

➜  trillian-tessera git:(posix-integration-test) go test -v -race ./integration/... --run_integration_test=true --log_url="http://localhost:2024" --write_log_url="http://localhost:2025" --log_public_key="example.com/log/testdata+33d7b496+AeHTu4Q3hEIMHNqc6fASMsq3rKNx280NI+oO5xCFkkSx"
=== RUN   TestLiveLogIntegration
    integration_test.go:95: checkpoint initial size: 0
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:137: checkpoint final size: 1024
    integration_test.go:178: log consistency for two checkpoints with same size (0) but different hashes ( vs e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855): unexpected proof returned
--- FAIL: TestLiveLogIntegration (12.26s)
FAIL
FAIL    github.com/transparency-dev/trillian-tessera/integration        12.577s
FAIL
➜  trillian-tessera git:(posix-integration-test) go test -v -race ./integration/... --run_integration_test=true --log_url="http://localhost:2024" --write_log_url="http://localhost:2025" --log_public_key="example.com/log/testdata+33d7b496+AeHTu4Q3hEIMHNqc6fASMsq3rKNx280NI+oO5xCFkkSx"
=== RUN   TestLiveLogIntegration
    integration_test.go:95: checkpoint initial size: 1024
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:119: checkpoint not found
    integration_test.go:116: client.FetchCheckpoint: Get "http://localhost:2024/checkpoint": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    integration_test.go:119: checkpoint not found
    integration_test.go:137: checkpoint final size: 2048
--- FAIL: TestLiveLogIntegration (12.16s)
FAIL
FAIL    github.com/transparency-dev/trillian-tessera/integration        12.466s
FAIL
➜  trillian-tessera git:(posix-integration-test) go test -v -race ./integration/... --run_integration_test=true --log_url="http://localhost:2024" --write_log_url="http://localhost:2025" --log_public_key="example.com/log/testdata+33d7b496+AeHTu4Q3hEIMHNqc6fASMsq3rKNx280NI+oO5xCFkkSx"
=== RUN   TestLiveLogIntegration
    integration_test.go:95: checkpoint initial size: 2048
    integration_test.go:137: checkpoint final size: 3072
--- PASS: TestLiveLogIntegration (12.10s)
PASS
ok      github.com/transparency-dev/trillian-tessera/integration        13.416s
➜  trillian-tessera git:(posix-integration-test) go test -v -race ./integration/... --run_integration_test=true --log_url="http://localhost:2024" --write_log_url="http://localhost:2025" --log_public_key="example.com/log/testdata+33d7b496+AeHTu4Q3hEIMHNqc6fASMsq3rKNx280NI+oO5xCFkkSx"
=== RUN   TestLiveLogIntegration
    integration_test.go:95: checkpoint initial size: 3072
    integration_test.go:137: checkpoint final size: 4096
--- PASS: TestLiveLogIntegration (11.93s)
PASS
ok      github.com/transparency-dev/trillian-tessera/integration        13.243s
roger2hk commented 2 months ago

Increased the timeout from 5 seconds to 10 seconds to stop the checkpoint fetch timeout in posix integration test.