src/integration-test/java/GreengrassEndToEndIT.java
@Test
    @Ignore
    public void shouldFailWhenTryingToRunFunctionWithUidAndGidZero() throws IOException, InterruptedException, MqttException {
        expectedSystemExit.expectSystemExitWithStatus(1);

        // First build with the normal UID and GID configuration
        greengrassBuildWithoutDockerDeploymentsIT.shouldBuildNodeFunctionWithoutDocker();

        setupJsonHelloWorldFunctionCheck(getNodeExpectedTopic());

        waitForContainerToStartSuccessfully(defaultTimeout);

        // Redeploy with the UID and GID set to zero, this should fail because the original group.json wasn't set up to allow functions to run as root
        replaceStringInFunctionDefaults("uid\\s*=\\s[0-9]+", "uid = 0");
        replaceStringInFunctionDefaults("gid\\s*=\\s[0-9]+", "gid = 0");

        greengrassBuildWithoutDockerDeploymentsIT.shouldBuildNodeFunctionWithoutDocker();

        Assert.fail("This should throw an exception");
    }
// Note: This test is now ignored because the function defaults no longer contains the uid and gid values
This test is now ignored because the function defaults no longer contains the uid and gid values
This test is now ignored because the function defaults no longer contains the uid and gid values
@Test
    @Ignore
    public void shouldFailWhenTryingToRunFunctionWithUidAndGidZero() throws IOException, InterruptedException, MqttException {
        expectedSystemExit.expectSystemExitWithStatus(1);
        greengrassBuildWithoutDockerDeploymentsIT.shouldBuildNodeFunctionWithoutDocker();
        setupJsonHelloWorldFunctionCheck(getNodeExpectedTopic());
        waitForContainerToStartSuccessfully(defaultTimeout);
        replaceStringInFunctionDefaults("uid\\s*=\\s[0-9]+", "uid = 0");
        replaceStringInFunctionDefaults("gid\\s*=\\s[0-9]+", "gid = 0");
        greengrassBuildWithoutDockerDeploymentsIT.shouldBuildNodeFunctionWithoutDocker();
        Assert.fail("This should throw an exception");
    }
@ Test @ Ignore public void shouldFailWhenTryingToRunFunctionWithUidAndGidZero ( ) throws IOException , InterruptedException , MqttException { expectedSystemExit . expectSystemExitWithStatus ( 1 ) ; greengrassBuildWithoutDockerDeploymentsIT . shouldBuildNodeFunctionWithoutDocker ( ) ; setupJsonHelloWorldFunctionCheck ( getNodeExpectedTopic ( ) ) ; waitForContainerToStartSuccessfully ( defaultTimeout ) ; replaceStringInFunctionDefaults ( "uid\\s*=\\s[0-9]+" , "uid = 0" ) ; replaceStringInFunctionDefaults ( "gid\\s*=\\s[0-9]+" , "gid = 0" ) ; greengrassBuildWithoutDockerDeploymentsIT . shouldBuildNodeFunctionWithoutDocker ( ) ; Assert . fail ( "This should throw an exception" ) ; }
Note: This test is now ignored because the function defaults no longer contains the uid and gid values
Note : This test is now ignored because the function defaults no longer contains the uid and gid values
// First build with the normal UID and GID configuration // Redeploy with the UID and GID set to zero, this should fail because the original group.json wasn't set up to allow functions to run as root