mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
4 hours ago 5e5b44b9a11a65749e726ce4c784ada7ac50b0c2
.github/workflows/build.yml
@@ -317,6 +317,7 @@
        opendj-server-legacy/target/package/opendj/bin/stop-ds
        rm -rf opendj-server-legacy/target/package/opendj/{config,db,changelogDb,logs,tmp}
    - name: Test replication
      id: replication
      if: runner.os == 'Linux'
      # dsreplication enable can hang indefinitely; without a timeout a hang
      # holds the runner until the 6-hour job limit. Normal duration is ~4 min.
@@ -329,38 +330,39 @@
        cp -r ./opendj-server-legacy/target/package/opendj ./opendj-server-legacy/target/package/opendj2
        cp -r ./opendj-server-legacy/target/package/opendj ./opendj-server-legacy/target/package/opendj3
        
        echo "Setup OpenDJ-1"
        echo "OpenDJ-1: setup"
        opendj-server-legacy/target/package/opendj1/setup -h localhost -p 1389 --ldapsPort 1636 --adminConnectorPort 4444 --enableStartTLS \
        --generateSelfSignedCertificate --rootUserDN "cn=Directory Manager" --rootUserPassword password --baseDN dc=example,dc=com \
        --sampleData 100000 --cli --acceptLicense --no-prompt
        
        echo "Setup OpenDJ-2 with replication"
        echo "OpenDJ-2: setup"
        opendj-server-legacy/target/package/opendj2/setup -h localhost -p 2389 --ldapsPort 2636 --adminConnectorPort 4445 --enableStartTLS \
        --generateSelfSignedCertificate --rootUserDN "cn=Directory Manager" --rootUserPassword password --baseDN dc=example,dc=com \
        --addBaseEntry --cli --acceptLicense --no-prompt
        
        echo "OpenDJ-2: dsreplication enable with OpenDJ-1"
        opendj-server-legacy/target/package/opendj2/bin/dsreplication enable --no-prompt --host1 localhost --port1 4444 --bindDN1 "cn=Directory Manager"  --bindPassword1 password --replicationPort1 8989 \
        --host2 localhost --port2 4445 --bindDN2 "cn=Directory Manager" --bindPassword2 password --replicationPort2 8990 \
        --adminUID admin --adminPassword password --baseDN dc=example,dc=com --trustAll --noPropertiesFile
        
        echo "OpenDJ-2: dsreplication initialize from OpenDJ-1"
        opendj-server-legacy/target/package/opendj2/bin/dsreplication initialize --baseDN dc=example,dc=com --adminUID admin --adminPassword password --hostSource localhost \
        --portSource 4444 --hostDestination localhost --portDestination 4445 -X -n
        
        opendj-server-legacy/target/package/opendj2/bin/ldapsearch --port 2636 --hostname localhost --bindDN "cn=Directory Manager" --bindPassword password --useSsl --trustAll \
        --baseDN "ou=people,dc=example,dc=com" --searchScope sub "(uid=user.*)" dn  | grep ^dn: | wc -l | grep -q 100000
        
        echo "Setup OpenDJ-3 with replication"
        echo "OpenDJ-3: setup"
        opendj-server-legacy/target/package/opendj3/setup -h localhost -p 3389 --ldapsPort 3636 --adminConnectorPort 4446 --enableStartTLS \
        --generateSelfSignedCertificate --rootUserDN "cn=Directory Manager" --rootUserPassword password --baseDN dc=example,dc=com \
        --addBaseEntry --cli --acceptLicense --no-prompt
        
        echo "OpenDJ-3: dsreplication enable with OpenDJ-2"
        opendj-server-legacy/target/package/opendj3/bin/dsreplication enable --no-prompt --host1 localhost --port1 4445 --bindDN1 "cn=Directory Manager"  --bindPassword1 password --replicationPort1 8990 \
        --host2 localhost --port2 4446 --bindDN2 "cn=Directory Manager" --bindPassword2 password --replicationPort2 8991 \
        --adminUID admin --adminPassword password --baseDN dc=example,dc=com --trustAll --noPropertiesFile
        
        echo "OpenDJ-3: dsreplication initialize from OpenDJ-2"
        opendj-server-legacy/target/package/opendj3/bin/dsreplication initialize --baseDN dc=example,dc=com --adminUID admin --adminPassword password --hostSource localhost \
        --portSource 4445 --hostDestination localhost --portDestination 4446 -X -n
        
@@ -377,6 +379,16 @@
        rm -rf ./opendj-server-legacy/target/package/opendj2
        rm -rf ./opendj-server-legacy/target/package/opendj3
    - name: Upload replication logs
      if: failure() && steps.replication.outcome == 'failure'
      uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
      with:
        name: replication-logs-${{ matrix.os }}-${{ matrix.java }}-attempt-${{ github.run_attempt }}
        path: |
          opendj-server-legacy/target/package/opendj[123]/logs/
          opendj-server-legacy/target/package/opendj[123]/tmp/opendj-replication-*.log
        retention-days: 5
    - name: Test on Windows
      if: runner.os == 'Windows'
      run:   |