Refactor: move HandshakeState to own struct in preparation for NTCP2 mods
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
test-crypto-aes-all: test-crypto-aes-core test-crypto-aes-validation test-crypto-aes-padding
|
||||
|
||||
test-crypto-aes-core:
|
||||
go test -v ./lib/crypto -run TestAESEncryptDecrypt
|
||||
$(GO) test -v ./lib/crypto -run TestAESEncryptDecrypt
|
||||
|
||||
test-crypto-aes-validation:
|
||||
go test -v ./lib/crypto -run TestAESEncryptInvalidKey
|
||||
go test -v ./lib/crypto -run TestAESDecryptInvalidInput
|
||||
$(GO) test -v ./lib/crypto -run TestAESEncryptInvalidKey
|
||||
$(GO) test -v ./lib/crypto -run TestAESDecryptInvalidInput
|
||||
|
||||
test-crypto-aes-padding:
|
||||
go test -v ./lib/crypto -run TestPKCS7PadUnpad
|
||||
go test -v ./lib/crypto -run TestPKCS7UnpadInvalidInput
|
||||
$(GO) test -v ./lib/crypto -run TestPKCS7PadUnpad
|
||||
$(GO) test -v ./lib/crypto -run TestPKCS7UnpadInvalidInput
|
||||
|
||||
.PHONY: test-crypto-aes-all \
|
||||
test-crypto-aes-core \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
test-base32-encode-decode-not-mangled:
|
||||
go test -v ./lib/common/base32 -run TestEncodeDecodeNotMangled
|
||||
$(GO) test -v ./lib/common/base32 -run TestEncodeDecodeNotMangled
|
||||
|
||||
.PHONY: test-base32-encode-decode-not-mangled
|
@@ -1,4 +1,4 @@
|
||||
test-base64-encode-decode-not-mangled:
|
||||
go test -v ./lib/common/base64 -run TestEncodeDecodeNotMangled
|
||||
$(GO) test -v ./lib/common/base64 -run TestEncodeDecodeNotMangled
|
||||
|
||||
.PHONY: test-base64-encode-decode-not-mangled
|
@@ -1,22 +1,22 @@
|
||||
test-build-request-all: test-build-request-receive test-build-request-ident test-build-request-components
|
||||
|
||||
test-build-request-receive:
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordReceiveTunnel
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordReceiveTunnel
|
||||
|
||||
test-build-request-ident:
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordOurIdent
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordOurIdent
|
||||
|
||||
test-build-request-components:
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordNextTunnel
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordNextIdent
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordLayerKey
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordIVKey
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordReplyKey
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordReplyIV
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordFlag
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordRequestTime
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordSendMessageID
|
||||
go test -v ./lib/i2np -run TestReadBuildRequestRecordPadding
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordNextTunnel
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordNextIdent
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordLayerKey
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordIVKey
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordReplyKey
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordReplyIV
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordFlag
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordRequestTime
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordSendMessageID
|
||||
$(GO) test -v ./lib/i2np -run TestReadBuildRequestRecordPadding
|
||||
|
||||
.PHONY: test-build-request-all \
|
||||
test-build-request-receive \
|
||||
|
@@ -2,46 +2,46 @@
|
||||
test-cert-all: test-cert-type test-cert-length test-cert-data test-cert-read test-cert-length-correct test-cert-length-too-short test-cert-length-data-short test-cert-data-correct test-cert-data-too-long test-cert-data-too-short test-cert-read-correct test-cert-read-short test-cert-read-remainder test-cert-read-invalid
|
||||
|
||||
test-cert-type:
|
||||
go test -v ./lib/common/certificate -run TestCertificateTypeIsFirstByte
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateTypeIsFirstByte
|
||||
|
||||
test-cert-length:
|
||||
go test -v ./lib/common/certificate -run TestCertificateLength
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateLength
|
||||
|
||||
test-cert-data:
|
||||
go test -v ./lib/common/certificate -run TestCertificateData
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateData
|
||||
|
||||
test-cert-read:
|
||||
go test -v ./lib/common/certificate -run TestReadCertificate
|
||||
$(GO) test -v ./lib/common/certificate -run TestReadCertificate
|
||||
|
||||
test-cert-length-correct:
|
||||
go test -v ./lib/common/certificate -run TestCertificateLengthCorrect
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateLengthCorrect
|
||||
|
||||
test-cert-length-too-short:
|
||||
go test -v ./lib/common/certificate -run TestCertificateLengthErrWhenTooShort
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateLengthErrWhenTooShort
|
||||
|
||||
test-cert-length-data-short:
|
||||
go test -v ./lib/common/certificate -run TestCertificateLengthErrWhenDataTooShort
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateLengthErrWhenDataTooShort
|
||||
|
||||
test-cert-data-correct:
|
||||
go test -v ./lib/common/certificate -run TestCertificateDataWhenCorrectSize
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateDataWhenCorrectSize
|
||||
|
||||
test-cert-data-too-long:
|
||||
go test -v ./lib/common/certificate -run TestCertificateDataWhenTooLong
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateDataWhenTooLong
|
||||
|
||||
test-cert-data-too-short:
|
||||
go test -v ./lib/common/certificate -run TestCertificateDataWhenTooShort
|
||||
$(GO) test -v ./lib/common/certificate -run TestCertificateDataWhenTooShort
|
||||
|
||||
test-cert-read-correct:
|
||||
go test -v ./lib/common/certificate -run TestReadCertificateWithCorrectData
|
||||
$(GO) test -v ./lib/common/certificate -run TestReadCertificateWithCorrectData
|
||||
|
||||
test-cert-read-short:
|
||||
go test -v ./lib/common/certificate -run TestReadCertificateWithDataTooShort
|
||||
$(GO) test -v ./lib/common/certificate -run TestReadCertificateWithDataTooShort
|
||||
|
||||
test-cert-read-remainder:
|
||||
go test -v ./lib/common/certificate -run TestReadCertificateWithRemainder
|
||||
$(GO) test -v ./lib/common/certificate -run TestReadCertificateWithRemainder
|
||||
|
||||
test-cert-read-invalid:
|
||||
go test -v ./lib/common/certificate -run TestReadCertificateWithInvalidLength
|
||||
$(GO) test -v ./lib/common/certificate -run TestReadCertificateWithInvalidLength
|
||||
|
||||
# Declare all targets as PHONY
|
||||
.PHONY: test-cert-all \
|
||||
|
@@ -1,2 +1,2 @@
|
||||
test-date-time-from-milliseconds:
|
||||
go test -v ./lib/common/data -run TestTimeFromMilliseconds
|
||||
$(GO) test -v ./lib/common/data -run TestTimeFromMilliseconds
|
@@ -1,17 +1,17 @@
|
||||
test-crypto-dsa-all: test-crypto-dsa test-crypto-dsa-benchmarks
|
||||
|
||||
test-crypto-dsa:
|
||||
go test -v ./lib/crypto -run TestDSA
|
||||
$(GO) test -v ./lib/crypto -run TestDSA
|
||||
|
||||
test-crypto-dsa-benchmarks:
|
||||
go test -v ./lib/crypto -bench=DSA -run=^$
|
||||
$(GO) test -v ./lib/crypto -bench=DSA -run=^$
|
||||
|
||||
# Individual benchmarks
|
||||
test-crypto-dsa-bench-generate:
|
||||
go test -v ./lib/crypto -bench=DSAGenerate -run=^$
|
||||
$(GO) test -v ./lib/crypto -bench=DSAGenerate -run=^$
|
||||
|
||||
test-crypto-dsa-bench-sign-verify:
|
||||
go test -v ./lib/crypto -bench=DSASignVerify -run=^$
|
||||
$(GO) test -v ./lib/crypto -bench=DSASignVerify -run=^$
|
||||
|
||||
.PHONY: test-crypto-dsa-all \
|
||||
test-crypto-dsa \
|
||||
|
@@ -1,7 +1,7 @@
|
||||
test-crypto-ed25519-all: test-crypto-ed25519
|
||||
|
||||
test-crypto-ed25519:
|
||||
go test -v ./lib/crypto -run TestEd25519
|
||||
$(GO) test -v ./lib/crypto -run TestEd25519
|
||||
|
||||
.PHONY: test-crypto-ed25519-all \
|
||||
test-crypto-ed25519
|
||||
|
@@ -1,20 +1,20 @@
|
||||
test-crypto-elg-all: test-crypto-elg test-crypto-elg-benchmarks
|
||||
|
||||
test-crypto-elg:
|
||||
go test -v ./lib/crypto -run TestElg
|
||||
$(GO) test -v ./lib/crypto -run TestElg
|
||||
|
||||
test-crypto-elg-benchmarks:
|
||||
go test -v ./lib/crypto -bench=Elg -run=^$
|
||||
$(GO) test -v ./lib/crypto -bench=Elg -run=^$
|
||||
|
||||
# Individual benchmarks
|
||||
test-crypto-elg-bench-generate:
|
||||
go test -v ./lib/crypto -bench=ElgGenerate -run=^$
|
||||
$(GO) test -v ./lib/crypto -bench=ElgGenerate -run=^$
|
||||
|
||||
test-crypto-elg-bench-encrypt:
|
||||
go test -v ./lib/crypto -bench=ElgEncrypt -run=^$
|
||||
$(GO) test -v ./lib/crypto -bench=ElgEncrypt -run=^$
|
||||
|
||||
test-crypto-elg-bench-decrypt:
|
||||
go test -v ./lib/crypto -bench=ElgDecrypt -run=^$
|
||||
$(GO) test -v ./lib/crypto -bench=ElgDecrypt -run=^$
|
||||
|
||||
.PHONY: test-crypto-elg-all \
|
||||
test-crypto-elg \
|
||||
|
@@ -2,24 +2,24 @@
|
||||
test-i2np-header-all: test-i2np-type test-i2np-message test-i2np-expiration test-i2np-ntcp-components test-i2np-data test-i2np-regression
|
||||
|
||||
test-i2np-type:
|
||||
go test -v ./lib/i2np -run TestReadI2NPTypeWith
|
||||
$(GO) test -v ./lib/i2np -run TestReadI2NPTypeWith
|
||||
|
||||
test-i2np-message:
|
||||
go test -v ./lib/i2np -run TestReadI2NPNTCPMessageID
|
||||
$(GO) test -v ./lib/i2np -run TestReadI2NPNTCPMessageID
|
||||
|
||||
test-i2np-expiration:
|
||||
go test -v ./lib/i2np -run TestReadI2NPNTCPMessageExpiration
|
||||
go test -v ./lib/i2np -run TestReadI2NPSSUMessageExpiration
|
||||
$(GO) test -v ./lib/i2np -run TestReadI2NPNTCPMessageExpiration
|
||||
$(GO) test -v ./lib/i2np -run TestReadI2NPSSUMessageExpiration
|
||||
|
||||
test-i2np-ntcp-components:
|
||||
go test -v ./lib/i2np -run TestReadI2NPNTCPMessageSize
|
||||
go test -v ./lib/i2np -run TestReadI2NPNTCPMessageChecksum
|
||||
$(GO) test -v ./lib/i2np -run TestReadI2NPNTCPMessageSize
|
||||
$(GO) test -v ./lib/i2np -run TestReadI2NPNTCPMessageChecksum
|
||||
|
||||
test-i2np-data:
|
||||
go test -v ./lib/i2np -run TestReadI2NPNTCPData
|
||||
$(GO) test -v ./lib/i2np -run TestReadI2NPNTCPData
|
||||
|
||||
test-i2np-regression:
|
||||
go test -v ./lib/i2np -run TestCrasherRegression123781
|
||||
$(GO) test -v ./lib/i2np -run TestCrasherRegression123781
|
||||
|
||||
.PHONY: test-i2np-header-all \
|
||||
test-i2np-type \
|
||||
|
@@ -1,7 +1,7 @@
|
||||
test-crypto-hmac-all: test-crypto-hmac
|
||||
|
||||
test-crypto-hmac:
|
||||
go test -v ./lib/crypto -run Test_I2PHMAC
|
||||
$(GO) test -v ./lib/crypto -run Test_I2PHMAC
|
||||
|
||||
.PHONY: test-crypto-hmac-all \
|
||||
test-crypto-hmac
|
||||
|
@@ -1,13 +1,13 @@
|
||||
test-integer-all: test-integer-big-endian test-integer-one-byte test-integer-zero
|
||||
|
||||
test-integer-big-endian:
|
||||
go test -v ./lib/common/integer -run TestIntegerBigEndian
|
||||
$(GO) test -v ./lib/common/integer -run TestIntegerBigEndian
|
||||
|
||||
test-integer-one-byte:
|
||||
go test -v ./lib/common/integer -run TestWorksWithOneByte
|
||||
$(GO) test -v ./lib/common/integer -run TestWorksWithOneByte
|
||||
|
||||
test-integer-zero:
|
||||
go test -v ./lib/common/integer -run TestIsZeroWithNoData
|
||||
$(GO) test -v ./lib/common/integer -run TestIsZeroWithNoData
|
||||
|
||||
.PHONY: test-integer-all \
|
||||
test-integer-big-endian \
|
||||
|
@@ -1,21 +1,21 @@
|
||||
test-key-cert-all: test-key-cert-signing test-key-cert-public test-key-cert-construct
|
||||
|
||||
test-key-cert-signing:
|
||||
go test -v ./lib/common/key_certificate -run TestSingingPublicKeyTypeReturnsCorrectInteger
|
||||
go test -v ./lib/common/key_certificate -run TestSingingPublicKeyTypeReportsWhenDataTooSmall
|
||||
go test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyReportsWhenDataTooSmall
|
||||
go test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithDSASHA1
|
||||
go test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithP256
|
||||
go test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithP384
|
||||
go test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithP521
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestSingingPublicKeyTypeReturnsCorrectInteger
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestSingingPublicKeyTypeReportsWhenDataTooSmall
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyReportsWhenDataTooSmall
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithDSASHA1
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithP256
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithP384
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestConstructSigningPublicKeyWithP521
|
||||
|
||||
test-key-cert-public:
|
||||
go test -v ./lib/common/key_certificate -run TestPublicKeyTypeReturnsCorrectInteger
|
||||
go test -v ./lib/common/key_certificate -run TestPublicKeyTypeReportsWhenDataTooSmall
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestPublicKeyTypeReturnsCorrectInteger
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestPublicKeyTypeReportsWhenDataTooSmall
|
||||
|
||||
test-key-cert-construct:
|
||||
go test -v ./lib/common/key_certificate -run TestConstructPublicKeyReportsWhenDataTooSmall
|
||||
go test -v ./lib/common/key_certificate -run TestConstructPublicKeyReturnsCorrectDataWithElg
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestConstructPublicKeyReportsWhenDataTooSmall
|
||||
$(GO) test -v ./lib/common/key_certificate -run TestConstructPublicKeyReturnsCorrectDataWithElg
|
||||
|
||||
.PHONY: test-key-cert-all \
|
||||
test-key-cert-signing \
|
||||
|
@@ -1,27 +1,27 @@
|
||||
test-keys-cert-all: test-keys-cert-certificate test-keys-cert-public test-keys-cert-signing test-keys-cert-creation
|
||||
|
||||
test-keys-cert-certificate:
|
||||
go test -v ./lib/common/keys_and_cert -run TestCertificateWithValidData
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestCertificateWithValidData
|
||||
|
||||
test-keys-cert-public:
|
||||
go test -v ./lib/common/keys_and_cert -run TestPublicKeyWithBadData
|
||||
go test -v ./lib/common/keys_and_cert -run TestPublicKeyWithBadCertificate
|
||||
go test -v ./lib/common/keys_and_cert -run TestPublicKeyWithNullCertificate
|
||||
go test -v ./lib/common/keys_and_cert -run TestPublicKeyWithKeyCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestPublicKeyWithBadData
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestPublicKeyWithBadCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestPublicKeyWithNullCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestPublicKeyWithKeyCertificate
|
||||
|
||||
test-keys-cert-signing:
|
||||
go test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithBadData
|
||||
go test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithBadCertificate
|
||||
go test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithNullCertificate
|
||||
go test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithKeyCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithBadData
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithBadCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithNullCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestSigningPublicKeyWithKeyCertificate
|
||||
|
||||
test-keys-cert-creation:
|
||||
go test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithMissingData
|
||||
go test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithMissingCertData
|
||||
go test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithCertificate
|
||||
go test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithoutCertificate
|
||||
go test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithCertificateAndRemainder
|
||||
go test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithoutCertificateAndRemainder
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithMissingData
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithMissingCertData
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithoutCertificate
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithCertificateAndRemainder
|
||||
$(GO) test -v ./lib/common/keys_and_cert -run TestNewKeysAndCertWithValidDataWithoutCertificateAndRemainder
|
||||
|
||||
.PHONY: test-keys-cert-all \
|
||||
test-keys-cert-certificate \
|
||||
|
@@ -1,20 +1,20 @@
|
||||
test-lease-set-all: test-lease-set-basic test-lease-set-leases test-lease-set-expiration
|
||||
|
||||
test-lease-set-basic:
|
||||
go test -v ./lib/common/lease_set -run TestDestinationIsCorrect
|
||||
go test -v ./lib/common/lease_set -run TestPublicKeyIsCorrect
|
||||
go test -v ./lib/common/lease_set -run TestSigningKeyIsCorrect
|
||||
go test -v ./lib/common/lease_set -run TestSignatureIsCorrect
|
||||
$(GO) test -v ./lib/common/lease_set -run TestDestinationIsCorrect
|
||||
$(GO) test -v ./lib/common/lease_set -run TestPublicKeyIsCorrect
|
||||
$(GO) test -v ./lib/common/lease_set -run TestSigningKeyIsCorrect
|
||||
$(GO) test -v ./lib/common/lease_set -run TestSignatureIsCorrect
|
||||
|
||||
test-lease-set-leases:
|
||||
go test -v ./lib/common/lease_set -run TestLeaseCountCorrect
|
||||
go test -v ./lib/common/lease_set -run TestLeaseCountCorrectWithMultiple
|
||||
go test -v ./lib/common/lease_set -run TestLeaseCountErrorWithTooMany
|
||||
go test -v ./lib/common/lease_set -run TestLeasesHaveCorrectData
|
||||
$(GO) test -v ./lib/common/lease_set -run TestLeaseCountCorrect
|
||||
$(GO) test -v ./lib/common/lease_set -run TestLeaseCountCorrectWithMultiple
|
||||
$(GO) test -v ./lib/common/lease_set -run TestLeaseCountErrorWithTooMany
|
||||
$(GO) test -v ./lib/common/lease_set -run TestLeasesHaveCorrectData
|
||||
|
||||
test-lease-set-expiration:
|
||||
go test -v ./lib/common/lease_set -run TestNewestExpirationIsCorrect
|
||||
go test -v ./lib/common/lease_set -run TestOldestExpirationIsCorrect
|
||||
$(GO) test -v ./lib/common/lease_set -run TestNewestExpirationIsCorrect
|
||||
$(GO) test -v ./lib/common/lease_set -run TestOldestExpirationIsCorrect
|
||||
|
||||
.PHONY: test-lease-set-all \
|
||||
test-lease-set-basic \
|
||||
|
@@ -1,25 +1,25 @@
|
||||
test-mapping-all: test-mapping-values test-mapping-duplicates test-mapping-conversion test-mapping-utils
|
||||
|
||||
test-mapping-values:
|
||||
go test -v ./lib/common/data -run TestValuesExclusesPairWithBadData
|
||||
go test -v ./lib/common/data -run TestValuesWarnsMissingData
|
||||
go test -v ./lib/common/data -run TestValuesWarnsExtraData
|
||||
go test -v ./lib/common/data -run TestValuesEnforcesEqualDelimitor
|
||||
go test -v ./lib/common/data -run TestValuesEnforcedSemicolonDelimitor
|
||||
go test -v ./lib/common/data -run TestValuesReturnsValues
|
||||
$(GO) test -v ./lib/common/data -run TestValuesExclusesPairWithBadData
|
||||
$(GO) test -v ./lib/common/data -run TestValuesWarnsMissingData
|
||||
$(GO) test -v ./lib/common/data -run TestValuesWarnsExtraData
|
||||
$(GO) test -v ./lib/common/data -run TestValuesEnforcesEqualDelimitor
|
||||
$(GO) test -v ./lib/common/data -run TestValuesEnforcedSemicolonDelimitor
|
||||
$(GO) test -v ./lib/common/data -run TestValuesReturnsValues
|
||||
|
||||
test-mapping-duplicates:
|
||||
go test -v ./lib/common/data -run TestHasDuplicateKeysTrueWhenDuplicates
|
||||
go test -v ./lib/common/data -run TestHasDuplicateKeysFalseWithoutDuplicates
|
||||
go test -v ./lib/common/data -run TestReadMappingHasDuplicateKeys
|
||||
$(GO) test -v ./lib/common/data -run TestHasDuplicateKeysTrueWhenDuplicates
|
||||
$(GO) test -v ./lib/common/data -run TestHasDuplicateKeysFalseWithoutDuplicates
|
||||
$(GO) test -v ./lib/common/data -run TestReadMappingHasDuplicateKeys
|
||||
|
||||
test-mapping-conversion:
|
||||
go test -v ./lib/common/data -run TestGoMapToMappingProducesCorrectMapping
|
||||
go test -v ./lib/common/data -run TestFullGoMapToMappingProducesCorrectMapping
|
||||
$(GO) test -v ./lib/common/data -run TestGoMapToMappingProducesCorrectMapping
|
||||
$(GO) test -v ./lib/common/data -run TestFullGoMapToMappingProducesCorrectMapping
|
||||
|
||||
test-mapping-utils:
|
||||
go test -v ./lib/common/data -run TestStopValueRead
|
||||
go test -v ./lib/common/data -run TestBeginsWith
|
||||
$(GO) test -v ./lib/common/data -run TestStopValueRead
|
||||
$(GO) test -v ./lib/common/data -run TestBeginsWith
|
||||
|
||||
.PHONY: test-mapping-all \
|
||||
test-mapping-values \
|
||||
|
@@ -1,2 +1,2 @@
|
||||
test-mapping-values-order:
|
||||
go test -v ./lib/common/data -run TestMappingOrderSortsValuesThenKeys
|
||||
$(GO) test -v ./lib/common/data -run TestMappingOrderSortsValuesThenKeys
|
@@ -1,16 +1,16 @@
|
||||
test-noise-transport-all: test-noise-packet-encryption test-noise-transport-connection test-noise-packet-obfuscation test-noise-packet-obfuscation-func
|
||||
|
||||
test-noise-packet-encryption:
|
||||
go test -v ./lib/transport/noise -run TestEncryptDecryptPacketOffline
|
||||
$(GO) test -v ./lib/transport/noise -run TestEncryptDecryptPacketOffline
|
||||
|
||||
test-noise-transport-connection:
|
||||
go test -v ./lib/transport/noise -run TestTransport
|
||||
$(GO) test -v ./lib/transport/noise -run TestTransport
|
||||
|
||||
test-noise-packet-obfuscation:
|
||||
go test -v ./lib/transport/noise -run TestEncryptDecryptPacketObfsOffline
|
||||
$(GO) test -v ./lib/transport/noise -run TestEncryptDecryptPacketObfsOffline
|
||||
|
||||
test-noise-packet-obfuscation-func:
|
||||
go test -v ./lib/transport/noise -run TestEncryptDecryptPacketObfsOfflineWithFunc
|
||||
$(GO) test -v ./lib/transport/noise -run TestEncryptDecryptPacketObfsOfflineWithFunc
|
||||
|
||||
.PHONY: test-noise-transport-all \
|
||||
test-noise-packet-encryption \
|
||||
|
@@ -1,17 +1,17 @@
|
||||
test-router-address-all: test-router-address-validation test-router-address-functionality test-router-address-fuzz
|
||||
|
||||
test-router-address-validation:
|
||||
go test -v ./lib/common/router_address -run TestCheckValidReportsEmptySlice
|
||||
go test -v ./lib/common/router_address -run TestCheckRouterAddressValidReportsDataMissing
|
||||
go test -v ./lib/common/router_address -run TestCheckRouterAddressValidNoErrWithValidData
|
||||
$(GO) test -v ./lib/common/router_address -run TestCheckValidReportsEmptySlice
|
||||
$(GO) test -v ./lib/common/router_address -run TestCheckRouterAddressValidReportsDataMissing
|
||||
$(GO) test -v ./lib/common/router_address -run TestCheckRouterAddressValidNoErrWithValidData
|
||||
|
||||
test-router-address-functionality:
|
||||
go test -v ./lib/common/router_address -run TestRouterAddressCostReturnsFirstByte
|
||||
go test -v ./lib/common/router_address -run TestRouterAddressExpirationReturnsCorrectData
|
||||
go test -v ./lib/common/router_address -run TestReadRouterAddressReturnsCorrectRemainderWithoutError
|
||||
$(GO) test -v ./lib/common/router_address -run TestRouterAddressCostReturnsFirstByte
|
||||
$(GO) test -v ./lib/common/router_address -run TestRouterAddressExpirationReturnsCorrectData
|
||||
$(GO) test -v ./lib/common/router_address -run TestReadRouterAddressReturnsCorrectRemainderWithoutError
|
||||
|
||||
test-router-address-fuzz:
|
||||
go test -v ./lib/common/router_address -run TestCorrectsFuzzCrasher1
|
||||
$(GO) test -v ./lib/common/router_address -run TestCorrectsFuzzCrasher1
|
||||
|
||||
.PHONY: test-router-address-all \
|
||||
test-router-address-validation \
|
||||
|
@@ -1,23 +1,23 @@
|
||||
test-router-info-all: test-router-info-published test-router-info-addresses test-router-info-identity test-router-info-misc
|
||||
|
||||
test-router-info-published:
|
||||
go test -v ./lib/common/router_info -run TestPublishedReturnsCorrectDate
|
||||
go test -v ./lib/common/router_info -run TestPublishedReturnsCorrectErrorWithPartialDate
|
||||
go test -v ./lib/common/router_info -run TestPublishedReturnsCorrectErrorWithInvalidData
|
||||
$(GO) test -v ./lib/common/router_info -run TestPublishedReturnsCorrectDate
|
||||
$(GO) test -v ./lib/common/router_info -run TestPublishedReturnsCorrectErrorWithPartialDate
|
||||
$(GO) test -v ./lib/common/router_info -run TestPublishedReturnsCorrectErrorWithInvalidData
|
||||
|
||||
test-router-info-addresses:
|
||||
go test -v ./lib/common/router_info -run TestRouterAddressCountReturnsCorrectCount
|
||||
go test -v ./lib/common/router_info -run TestRouterAddressCountReturnsCorrectErrorWithInvalidData
|
||||
go test -v ./lib/common/router_info -run TestRouterAddressesReturnsAddresses
|
||||
go test -v ./lib/common/router_info -run TestRouterAddressesReturnsAddressesWithMultiple
|
||||
$(GO) test -v ./lib/common/router_info -run TestRouterAddressCountReturnsCorrectCount
|
||||
$(GO) test -v ./lib/common/router_info -run TestRouterAddressCountReturnsCorrectErrorWithInvalidData
|
||||
$(GO) test -v ./lib/common/router_info -run TestRouterAddressesReturnsAddresses
|
||||
$(GO) test -v ./lib/common/router_info -run TestRouterAddressesReturnsAddressesWithMultiple
|
||||
|
||||
test-router-info-identity:
|
||||
go test -v ./lib/common/router_info -run TestRouterIdentityIsCorrect
|
||||
$(GO) test -v ./lib/common/router_info -run TestRouterIdentityIsCorrect
|
||||
|
||||
test-router-info-misc:
|
||||
go test -v ./lib/common/router_info -run TestPeerSizeIsZero
|
||||
go test -v ./lib/common/router_info -run TestOptionsAreCorrect
|
||||
go test -v ./lib/common/router_info -run TestSignatureIsCorrectSize
|
||||
$(GO) test -v ./lib/common/router_info -run TestPeerSizeIsZero
|
||||
$(GO) test -v ./lib/common/router_info -run TestOptionsAreCorrect
|
||||
$(GO) test -v ./lib/common/router_info -run TestSignatureIsCorrectSize
|
||||
|
||||
.PHONY: test-router-info-all \
|
||||
test-router-info-published \
|
||||
|
@@ -1,24 +1,24 @@
|
||||
test-string-all: test-string-length test-string-data test-string-conversion test-string-read
|
||||
|
||||
test-string-length:
|
||||
go test -v ./lib/common/data -run TestStringReportsCorrectLength
|
||||
go test -v ./lib/common/data -run TestI2PStringReportsLengthZeroError
|
||||
go test -v ./lib/common/data -run TestI2PStringReportsExtraDataError
|
||||
go test -v ./lib/common/data -run TestI2PStringDataReportsLengthZeroError
|
||||
$(GO) test -v ./lib/common/data -run TestStringReportsCorrectLength
|
||||
$(GO) test -v ./lib/common/data -run TestI2PStringReportsLengthZeroError
|
||||
$(GO) test -v ./lib/common/data -run TestI2PStringReportsExtraDataError
|
||||
$(GO) test -v ./lib/common/data -run TestI2PStringDataReportsLengthZeroError
|
||||
|
||||
test-string-data:
|
||||
go test -v ./lib/common/data -run TestI2PStringDataReportsExtraDataError
|
||||
go test -v ./lib/common/data -run TestI2PStringDataEmptyWhenZeroLength
|
||||
go test -v ./lib/common/data -run TestI2PStringDataErrorWhenNonZeroLengthOnly
|
||||
$(GO) test -v ./lib/common/data -run TestI2PStringDataReportsExtraDataError
|
||||
$(GO) test -v ./lib/common/data -run TestI2PStringDataEmptyWhenZeroLength
|
||||
$(GO) test -v ./lib/common/data -run TestI2PStringDataErrorWhenNonZeroLengthOnly
|
||||
|
||||
test-string-conversion:
|
||||
go test -v ./lib/common/data -run TestToI2PI2PStringFormatsCorrectly
|
||||
go test -v ./lib/common/data -run TestToI2PStringReportsOverflows
|
||||
$(GO) test -v ./lib/common/data -run TestToI2PI2PStringFormatsCorrectly
|
||||
$(GO) test -v ./lib/common/data -run TestToI2PStringReportsOverflows
|
||||
|
||||
test-string-read:
|
||||
go test -v ./lib/common/data -run TestReadStringReadsLength
|
||||
go test -v ./lib/common/data -run TestReadI2PStringErrWhenEmptySlice
|
||||
go test -v ./lib/common/data -run TestReadI2PStringErrWhenDataTooShort
|
||||
$(GO) test -v ./lib/common/data -run TestReadStringReadsLength
|
||||
$(GO) test -v ./lib/common/data -run TestReadI2PStringErrWhenEmptySlice
|
||||
$(GO) test -v ./lib/common/data -run TestReadI2PStringErrWhenDataTooShort
|
||||
|
||||
.PHONY: test-string-all \
|
||||
test-string-length \
|
||||
|
@@ -1,10 +1,10 @@
|
||||
test-su3-all: test-su3-read test-su3-signature
|
||||
|
||||
test-su3-read:
|
||||
go test -v ./lib/su3 -run TestRead
|
||||
$(GO) test -v ./lib/su3 -run TestRead
|
||||
|
||||
test-su3-signature:
|
||||
go test -v ./lib/su3 -run TestReadSignatureFirst
|
||||
$(GO) test -v ./lib/su3 -run TestReadSignatureFirst
|
||||
|
||||
.PHONY: test-su3-all \
|
||||
test-su3-read \
|
||||
|
@@ -2,18 +2,18 @@ test-tunnel-all: test-tunnel-delivery-instructions test-tunnel-message
|
||||
|
||||
# Tests from delivery_test.go
|
||||
test-tunnel-delivery-instructions:
|
||||
go test -v ./lib/tunnel -run TestReadDeliveryInstructions
|
||||
$(GO) test -v ./lib/tunnel -run TestReadDeliveryInstructions
|
||||
|
||||
# Tests from message_test.go
|
||||
test-tunnel-message: test-tunnel-message-padding test-tunnel-message-fragments
|
||||
|
||||
test-tunnel-message-padding:
|
||||
go test -v ./lib/tunnel -run TestDeliveryInstructionDataWithNoPadding
|
||||
go test -v ./lib/tunnel -run TestDeliveryInstructionDataWithSomePadding
|
||||
go test -v ./lib/tunnel -run TestDeliveryInstructionDataWithOnlyPadding
|
||||
$(GO) test -v ./lib/tunnel -run TestDeliveryInstructionDataWithNoPadding
|
||||
$(GO) test -v ./lib/tunnel -run TestDeliveryInstructionDataWithSomePadding
|
||||
$(GO) test -v ./lib/tunnel -run TestDeliveryInstructionDataWithOnlyPadding
|
||||
|
||||
test-tunnel-message-fragments:
|
||||
go test -v ./lib/tunnel -run TestDeliveryInstructionsWithFragments
|
||||
$(GO) test -v ./lib/tunnel -run TestDeliveryInstructionsWithFragments
|
||||
|
||||
.PHONY: test-tunnel-all \
|
||||
test-tunnel-delivery-instructions \
|
||||
|
Reference in New Issue
Block a user