mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-22 12:22:06 +01:00
pgpainless-sop: reuse shared sop-java test suite
This commit is contained in:
parent
f4bd17ade8
commit
d53cd6d0bd
11 changed files with 152 additions and 0 deletions
|
@ -21,10 +21,14 @@ dependencies {
|
|||
// Logging
|
||||
testImplementation "ch.qos.logback:logback-classic:$logbackVersion"
|
||||
|
||||
// Depend on "shared" sop-java test suite (fixtures are turned into tests by inheritance inside test sources)
|
||||
testImplementation(testFixtures("org.pgpainless:sop-java:$sopJavaVersion"))
|
||||
|
||||
implementation(project(":pgpainless-core"))
|
||||
api "org.pgpainless:sop-java:$sopJavaVersion"
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
environment("test.implementation", "sop.testsuite.pgpainless.PGPainlessSopInstanceFactory")
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.pgpainless.sop.SOPImpl;
|
||||
import sop.SOP;
|
||||
import sop.testsuite.SOPInstanceFactory;
|
||||
|
||||
public class PGPainlessSopInstanceFactory extends SOPInstanceFactory {
|
||||
|
||||
@Override
|
||||
public Map<String, SOP> provideSOPInstances() {
|
||||
return Collections.singletonMap("PGPainless-SOP", new SOPImpl());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import sop.testsuite.operation.ArmorDearmorTest;
|
||||
|
||||
public class PGPainlessArmorDearmorTest extends ArmorDearmorTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import sop.testsuite.operation.DecryptWithSessionKeyTest;
|
||||
|
||||
public class PGPainlessDecryptWIthSessionKeyTest extends DecryptWithSessionKeyTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import sop.SOP;
|
||||
import sop.testsuite.operation.DetachedSignDetachedVerifyTest;
|
||||
|
||||
public class PGPainlessDetachedSignDetachedVerifyTest extends DetachedSignDetachedVerifyTest {
|
||||
|
||||
@Override
|
||||
@Disabled("Since we allow for dynamic cert loading, we can ignore this test")
|
||||
public void verifyMissingCertCausesMissingArg(SOP sop) {
|
||||
super.verifyMissingCertCausesMissingArg(sop);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import sop.testsuite.operation.EncryptDecryptTest;
|
||||
|
||||
public class PGPainlessEncryptDecryptTest extends EncryptDecryptTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import sop.SOP;
|
||||
import sop.testsuite.operation.ExtractCertTest;
|
||||
|
||||
public class PGPainlessExtractCertTest extends ExtractCertTest {
|
||||
|
||||
@Disabled("BC uses old CTBs causing mismatching byte arrays :/")
|
||||
@Override
|
||||
public void extractAliceCertFromAliceKeyTest(SOP sop) throws IOException {
|
||||
super.extractAliceCertFromAliceKeyTest(sop);
|
||||
}
|
||||
|
||||
@Disabled("BC uses old CTBs causing mismatching byte arrays :/")
|
||||
@Override
|
||||
public void extractBobsCertFromBobsKeyTest(SOP sop) throws IOException {
|
||||
super.extractBobsCertFromBobsKeyTest(sop);
|
||||
}
|
||||
|
||||
@Disabled("BC uses old CTBs causing mismatching byte arrays :/")
|
||||
@Override
|
||||
public void extractCarolsCertFromCarolsKeyTest(SOP sop) throws IOException {
|
||||
super.extractCarolsCertFromCarolsKeyTest(sop);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import sop.testsuite.operation.GenerateKeyTest;
|
||||
|
||||
public class PGPainlessGenerateKeyTest extends GenerateKeyTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import sop.testsuite.operation.InlineSignInlineDetachDetachedVerifyTest;
|
||||
|
||||
public class PGPainlessInlineSignInlineDetachDetachedVerifyTest
|
||||
extends InlineSignInlineDetachDetachedVerifyTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import sop.testsuite.operation.InlineSignInlineVerifyTest;
|
||||
|
||||
public class PGPainlessInlineSignInlineVerifyTest extends InlineSignInlineVerifyTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite.pgpainless.operation;
|
||||
|
||||
import sop.testsuite.operation.VersionTest;
|
||||
|
||||
public class PGPainlessVersionTest extends VersionTest {
|
||||
|
||||
}
|
Loading…
Reference in a new issue