Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;


public class SystemdIntegTests extends LuceneTestCase {
Expand Down Expand Up @@ -137,8 +138,9 @@ public void testFileDescriptorLimit() throws IOException, InterruptedException {

public void testSeccompEnabled() throws IOException, InterruptedException {
// Check if Seccomp is enabled
String seccomp = executeCommand("sudo su -c 'grep Seccomp /proc/" + opensearchPid + "/status'", "Failed to read Seccomp status");
assertFalse("Seccomp should be enabled", seccomp.contains("0"));
String seccomp = executeCommand("grep \"^Seccomp:\" /proc/" + opensearchPid + "/status", "Failed to read Seccomp status");
int seccompValue = Integer.parseInt(seccomp.split(":\\s*")[1].trim());
assertNotEquals("Seccomp should be enabled", 0, seccompValue);
}

public void testRebootSysCall() throws IOException, InterruptedException {
Expand Down
Loading