App-aep

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

vendor/cache/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.026.tar.gz
vendor/cache/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz
vendor/cache/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz
vendor/cache/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7046.tar.gz
vendor/cache/authors/id/M/MI/MIYAGAWA/Carton-v1.0.35.tar.gz
vendor/cache/authors/id/M/MI/MIYAGAWA/HTTP-Tinyish-0.18.tar.gz
vendor/cache/authors/id/M/MI/MIYAGAWA/Menlo-1.9019.tar.gz
vendor/cache/authors/id/M/MI/MIYAGAWA/Menlo-Legacy-1.9022.tar.gz
vendor/cache/authors/id/M/MI/MIYAGAWA/Module-CPANfile-1.1004.tar.gz
vendor/cache/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz
vendor/cache/authors/id/R/RC/RCAPUTO/IO-Pipely-0.006.tar.gz
vendor/cache/authors/id/R/RC/RCAPUTO/POE-Test-Loops-1.360.tar.gz
vendor/cache/authors/id/R/RE/REHSACK/Params-Util-1.102.tar.gz
vendor/cache/authors/id/R/RJ/RJBS/Data-OptList-0.112.tar.gz
vendor/cache/authors/id/R/RJ/RJBS/Getopt-Long-Descriptive-0.110.tar.gz
vendor/cache/authors/id/R/RJ/RJBS/IPC-Run3-0.048.tar.gz
vendor/cache/authors/id/R/RJ/RJBS/Sub-Exporter-0.988.tar.gz
vendor/cache/authors/id/R/RJ/RJBS/Sub-Install-0.928.tar.gz
vendor/cache/authors/id/R/RO/ROSCH/String-ShellQuote-1.04.tar.gz
vendor/cache/authors/id/R/RU/RURBAN/Cpanel-JSON-XS-4.36.tar.gz
vendor/cache/authors/id/S/SI/SIMBABQUE/URI-5.19.tar.gz
vendor/cache/authors/id/T/TI/TINITA/YAML-LibYAML-0.83.tar.gz

cpanfile.snapshot  view on Meta::CPAN

      HTTP::Tinyish::LWP undef
      HTTP::Tinyish::Wget undef
    requirements:
      ExtUtils::MakeMaker 0
      File::Which 0
      HTTP::Tiny 0.055
      IPC::Run3 0
      parent 0
      perl 5.008001
  IO-Pipely-0.006
    pathname: R/RC/RCAPUTO/IO-Pipely-0.006.tar.gz
    provides:
      IO::Pipely 0.006
    requirements:
      Exporter 5.72
      ExtUtils::MakeMaker 0
      Fcntl 1.13
      IO::Socket 1.38
      Symbol 1.08
      base 0
      perl 5.004

cpanfile.snapshot  view on Meta::CPAN

  POE-Session-PlainCall-0.0301
    pathname: G/GW/GWYN/POE-Session-PlainCall-0.0301.tar.gz
    provides:
      POE::Session::PlainCall 0.0301
      POE::Session::PlainCall::Holder 0.0301
    requirements:
      ExtUtils::MakeMaker 0
      POE 1
      Scalar::Util 0
  POE-Test-Loops-1.360
    pathname: R/RC/RCAPUTO/POE-Test-Loops-1.360.tar.gz
    provides:
      POE::Test::DondeEstan 1.360
      POE::Test::Loops 1.360
    requirements:
      ExtUtils::MakeMaker 0
      Test::More 1.001002
  Params-Util-1.102
    pathname: R/RE/REHSACK/Params-Util-1.102.tar.gz
    provides:
      Params::Util 1.102

t/integration/lock-protocol.sh  view on Meta::CPAN


sleep 2
if [ -S "$SOCKET_VOL/aep.sock" ]; then
    pass "Socket file created"
else
    fail "Socket file not found"
fi

# --- Test 2: Client connects, receives run, executes command ---
echo "[Test 2] Lock client 'db' connects and receives run signal"
DB_OUTPUT=$(timeout 15 docker run --rm --name aep-int-db -v "$SOCKET_VOL:/tmp" \
    "$IMAGE" --lock-client --lock-id db \
    --command echo --command-args "db-started" \
    --lock-trigger "none:time:1000" --command-norestart 2>&1) || true

echo "$DB_OUTPUT" | grep -q "Received 'run'" && pass "Client received run signal" || fail "Client did not receive run"
echo "$DB_OUTPUT" | grep -q "Starting command: echo" && pass "Client started command" || fail "Client did not start command"
echo "$DB_OUTPUT" | grep -q "Lock trigger fired" && pass "Lock trigger fired" || fail "Lock trigger did not fire"
echo "$DB_OUTPUT" | grep -q "db-started" && pass "Command output captured" || fail "Command output missing"

# --- Test 3: Second client gets its turn after first ---
echo "[Test 3] Lock client 'app' gets run after 'db' completes"

# Check server received trigger_ok and advanced
SERVER_LOGS=$(docker logs aep-int-server 2>&1)
echo "$SERVER_LOGS" | grep -q "trigger success" && pass "Server received trigger_ok from db" || fail "Server did not receive trigger_ok"

APP_OUTPUT=$(timeout 15 docker run --rm --name aep-int-app -v "$SOCKET_VOL:/tmp" \
    "$IMAGE" --lock-client --lock-id app \
    --command echo --command-args "app-started" \
    --lock-trigger "none:time:1000" --command-norestart 2>&1) || true

echo "$APP_OUTPUT" | grep -q "Received 'run'" && pass "Second client received run" || fail "Second client did not receive run"
echo "$APP_OUTPUT" | grep -q "app-started" && pass "Second client command output" || fail "Second client output missing"

# --- Test 4: Standalone command execution ---
echo "[Test 4] Standalone command execution"
STANDALONE=$(docker run --rm "$IMAGE" --command echo --command-args "standalone-test" --command-norestart 2>&1)
echo "$STANDALONE" | grep -q "standalone mode" && pass "Standalone mode entered" || fail "Standalone mode not entered"
echo "$STANDALONE" | grep -q "standalone-test" && pass "Standalone output correct" || fail "Standalone output missing"

# --- Test 5: Command restart ---
echo "[Test 5] Command restart logic"
RESTART=$(docker run --rm "$IMAGE" --command /bin/false --command-restart 2 --command-restart-delay 100 2>&1)



( run in 2.239 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )