Skip to content

A free, open-source alternative to Burp Suite: an intercepting proxy and web app security testing suite with Repeater, Intruder, Collaborator and a built-in OWASP ZAP scanner. Linux, AGPL-3.0.

773 B
Raw Blame
package opensuite.core;

import opensuite.testkit.Expect;
import opensuite.testkit.Harness;

/** Tests the process-local settings store used by the test runner. */
public final class SettingsTest {
    public void run() {
        Harness.suite("settings isolation");

        Harness.test("test mode keeps settings in the test process", () -> {
            Expect.isTrue(Settings.usingTestStore(), "test store enabled");
            String key = "test.settings.isolation";
            Settings first = new Settings();
            first.set(key, "value");
            try {
                Expect.equal(new Settings().get(key, "missing"), "value", "shared by settings instances");
            } finally {
                first.remove(key);
            }
        });
    }
}