You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2019/05/14 16:34:11 UTC

[pulsar-client-go] 34/38: Added scripts to start test service

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git

commit fe3258b10c9b81e120c4600a1aec961df836b5e7
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Wed May 8 10:58:37 2019 -0700

    Added scripts to start test service
---
 Dockerfile                              |  41 +++++
 integration-tests/certs/broker-cert.pem |  73 +++++++++
 integration-tests/certs/broker-key.pem  |  28 ++++
 integration-tests/certs/cacert.pem      |  62 +++++++
 integration-tests/certs/client-cert.pem |  73 +++++++++
 integration-tests/certs/client-key.pem  |  28 ++++
 integration-tests/client.conf           |  27 +++
 integration-tests/standalone.conf       | 280 ++++++++++++++++++++++++++++++++
 pulsar-test-service-start.sh            |  79 +++++++++
 pulsar-test-service-stop.sh             |  35 ++++
 10 files changed, 726 insertions(+)

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..3451983
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+FROM golang:1.12 as go
+
+FROM apachepulsar/pulsar:latest
+
+COPY --from=go /usr/local/go /usr/local/go
+ENV PATH /root/go/bin:/usr/local/go/bin:$PATH
+
+### Add test scripts
+
+COPY integration-tests/certs /pulsar/certs
+COPY integration-tests/standalone.conf /pulsar/conf
+COPY integration-tests/client.conf /pulsar/conf
+COPY pulsar-test-service-start.sh /pulsar/bin
+COPY pulsar-test-service-stop.sh /pulsar/bin
+
+# Initialize test configuration and credentials
+RUN mkdir /pulsar/tokens
+RUN /pulsar/bin/pulsar tokens create-secret-key --output /pulsar/tokens/secret.key
+RUN /pulsar/bin/pulsar tokens create \
+                --subject token-principal \
+                --secret-key file:///pulsar/tokens/secret.key \
+                > /pulsar/tokens/token.txt
diff --git a/integration-tests/certs/broker-cert.pem b/integration-tests/certs/broker-cert.pem
new file mode 100644
index 0000000..69ad71c
--- /dev/null
+++ b/integration-tests/certs/broker-cert.pem
@@ -0,0 +1,73 @@
+Certificate:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            88:08:98:b3:13:d8:00:97
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, ST=CA, O=Apache, OU=Pulsar Incubator, CN=localhost
+        Validity
+            Not Before: Feb 17 02:06:21 2018 GMT
+            Not After : Nov 16 00:00:00 2030 GMT
+        Subject: C=US, ST=CA, O=Apache, OU=Apache Pulsar, CN=localhost
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:af:bf:b7:2d:98:ad:9d:f6:da:a3:13:d4:62:0f:
+                    98:be:1c:a2:89:22:ba:6f:d5:fd:1f:67:e3:91:03:
+                    98:80:81:0e:ed:d8:f6:70:7f:2c:36:68:3d:53:ea:
+                    58:3a:a6:d5:89:66:4b:bd:1e:57:71:13:6d:4b:11:
+                    e5:40:a5:76:84:24:92:40:58:80:96:c9:1f:2c:c4:
+                    55:eb:a3:79:73:70:5c:37:9a:89:ed:2f:ba:6b:e3:
+                    82:7c:69:4a:02:54:8b:81:5e:3c:bf:4c:8a:cb:ea:
+                    2c:5e:83:e7:b7:10:08:5f:82:58:a3:89:d1:da:92:
+                    ba:2a:28:ee:30:28:3f:5b:ae:10:71:96:c7:e1:12:
+                    c5:b0:1a:ad:44:6f:44:3a:11:4a:9a:3c:0f:8d:06:
+                    80:7b:34:ef:3f:6c:f4:5e:c5:44:54:1e:c8:dd:c7:
+                    80:85:80:d9:68:e6:c6:53:03:77:e1:fe:18:61:07:
+                    77:05:4c:ed:59:bc:5d:41:38:6a:ef:5d:a1:b2:60:
+                    98:d4:48:28:95:02:8a:0e:fd:cf:7b:1b:d2:11:cc:
+                    10:0c:50:73:d7:cc:38:6c:83:dd:79:26:aa:90:c8:
+                    9b:84:86:bc:59:e9:62:69:f4:98:1b:c4:80:78:7e:
+                    a0:1a:81:9d:d2:e1:66:dd:c4:cc:fc:63:04:ac:ec:
+                    a7:35
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: 
+                CA:FALSE
+            Netscape Comment: 
+                OpenSSL Generated Certificate
+            X509v3 Subject Key Identifier: 
+                D3:F3:19:AE:74:B1:AF:E7:AF:08:7B:16:72:78:29:87:79:ED:30:8C
+            X509v3 Authority Key Identifier: 
+                keyid:D4:7A:CD:0F:44:1B:16:29:25:14:ED:A2:EF:13:0F:A7:46:09:78:F6
+
+    Signature Algorithm: sha1WithRSAEncryption
+        0f:04:f3:91:f2:87:19:fe:9d:f8:34:5a:24:4a:00:d1:58:bf:
+        1e:b2:77:67:07:bc:78:b5:4b:9a:4b:fd:a1:e5:dc:0e:09:84:
+        9e:59:c4:dd:cf:f7:2e:bf:da:f3:31:36:6b:81:6e:a2:88:76:
+        e4:2e:0b:36:44:82:36:8f:80:93:f4:9e:fc:ed:85:d0:97:da:
+        0f:fb:c9:b9:8b:da:ae:07:3d:4f:82:b7:0c:25:22:63:12:6b:
+        0a:e9:c4:12:a4:5c:ed:11:12:cc:fe:b0:2e:d4:c1:ec:79:01:
+        60:ea:cc:cc:e5:66:cc:57:f6:55:a9:09:4c:63:01:e9:b4:2e:
+        73:a5
+-----BEGIN CERTIFICATE-----
+MIIDLjCCApegAwIBAgIJAIgImLMT2ACXMA0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kBYOrMzOVmzFf2VakJTGMB6bQu
+c6U=
+-----END CERTIFICATE-----
diff --git a/integration-tests/certs/broker-key.pem b/integration-tests/certs/broker-key.pem
new file mode 100644
index 0000000..004bf8e
--- /dev/null
+++ b/integration-tests/certs/broker-key.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCvv7ctmK2d9tqj
+E9RiD5i+HKKJIrpv1f0fZ+ORA5iAgQ7t2PZwfyw2aD1T6lg6ptWJZku9HldxE21L
+EeVApXaEJJJAWICWyR8sxFXro3lzcFw3montL7pr44J8aUoCVIuBXjy/TIrL6ixe
+g+e3EAhfglijidHakroqKO4wKD9brhBxlsfhEsWwGq1Eb0Q6EUqaPA+NBoB7NO8/
+bPRexURUHsjdx4CFgNlo5sZTA3fh/hhhB3cFTO1ZvF1BOGrvXaGyYJjUSCiVAooO
+/c97G9IRzBAMUHPXzDhsg915JqqQyJuEhrxZ6WJp9JgbxIB4fqAagZ3S4WbdxMz8
+YwSs7Kc1AgMBAAECggEAAaWEK9MwXTiA1+JJrRmETtOp2isPIBkbI/4vLZ6hASM0
+ZpoPxQIMAf58BJs/dF03xu/EaeMs4oxSC9ABG9fxAk/tZtjta3w65Ip6W5jOfHxj
+AMpb3HMEBhq9kDjUTq1IGVAutYQcEMkC3WfS9e4ahfqMpguWgbu6LsbvZFgcL9mv
+pGnKv9YVe6Xk6isvqtq6G1af0rd7c//xF0i0e/qEo83Buok3gLEZOELZbcRxjUYc
+jnyglnXnwkGjuL4E3wgS3l73ZKsb6+AYoqhMPVz8t4/PN3tTrsBJKOSYo8KzIm0U
+ek9T8XmPbP0cuheRxp9Dp8TXJJQZK0N9jz+EL0ogQQKBgQDnavm8GpR4pap9cDOc
++YI5s823b507pNdSU8elO9gLsP0JlFzv+sqghVko29r85D7Vn3MkgYTy0S4ANLCs
+0NFDY8N2QH6U1dTkk1QXZydVZDuKJ5SSpC4v+Vafl8yDxhB4Nlxhbm9vJEMfLcXh
+2kL6UlAuFDtYD0AdczwnHu5DjQKBgQDCauocm55FpcyDMMBO2CjurxcjBYS3S1xT
+Bz+sPtxJLjlKbAt8kSHUQcCcX9zhrQBfsT38LATCmKaOFqUW5/PPh2LcrxiMqlL1
+OJBUJ3Te2LTjlUn8r+DHv/69UIh5tchwRr3YgB0DuIs7jfmr4VfiOWTBtPVhoGFR
+1Wt60j30SQKBgHzreS26J2VNAFBALgxRf6OIVMbtgDG/FOCDCyU9vazp+F2gcd61
+QYYPFYcBzx9uUiDctroBFHRCyJMh3jEbc6ruAogl3m6XUxmkEeOkMk5dEerM3N2f
+tLL+5Gy385U6aI+LwKhzhcG4EGeXPNdjC362ykNldnddnB2Jo/H2N2XNAoGAdnft
+xpbxP+GDGKIZXTIM5zzcLWQMdiC+1n1BSHVZiGJZWMczzKknYw7aDq+/iekApE79
+xW8RS373ZvfXi3i2Mcx+6pjrrbOQL4tTL2SHq8+DknaDCi4mG7IbyUKMlxW1WO1S
+e929UGogtZ6S+DCte9WbVwosyFuRUetpvgLk67kCgYBWetihZjgBWrqVYT24TTRH
+KxzSzH1JgzzF9qgTdlhXDv9hC+Kc0uTKsgViesDqVuCOjkwzY5OQr9c6duO0fwwP
+qNk/qltdgjMC5iiv7duyukfbEuqKEdGGer9HFb7en96dZdVQJpYHaaslAGurtD80
+ejCQZgzR2XaHSuIQb0IUVQ==
+-----END PRIVATE KEY-----
diff --git a/integration-tests/certs/cacert.pem b/integration-tests/certs/cacert.pem
new file mode 100644
index 0000000..55e9067
--- /dev/null
+++ b/integration-tests/certs/cacert.pem
@@ -0,0 +1,62 @@
+Certificate:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            88:08:98:b3:13:d8:00:94
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, ST=CA, O=Apache, OU=Pulsar Incubator, CN=localhost
+        Validity
+            Not Before: Feb 17 01:37:33 2018 GMT
+            Not After : Feb 16 01:37:33 2021 GMT
+        Subject: C=US, ST=CA, O=Apache, OU=Pulsar Incubator, CN=localhost
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ea:16:8d:a5:b1:19:61:34:54:07:02:60:4e:6d:
+                    54:92:08:fd:fb:23:79:9c:05:bf:14:f7:bc:aa:db:
+                    2b:42:a4:35:74:86:e3:00:ad:8b:18:79:73:7d:f2:
+                    d1:74:dd:74:bc:b8:a2:4c:80:c9:f3:80:ce:bf:f8:
+                    6d:97:f5:05:4f:f4:b2:99:50:e8:d8:b0:c4:57:a0:
+                    e7:dc:82:57:75:2a:a2:02:21:76:f7:37:c2:dc:7c:
+                    4c:36:a6:73:6f:dc:75:48:72:ad:fa:98:02:70:b2:
+                    5e:a2:83:cc:c3:8d:20:a7:1e:bc:d7:1e:c1:d1:7e:
+                    39:35:4b:f5:be:6b:c1:0f:f9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Subject Key Identifier: 
+                D4:7A:CD:0F:44:1B:16:29:25:14:ED:A2:EF:13:0F:A7:46:09:78:F6
+            X509v3 Authority Key Identifier: 
+                keyid:D4:7A:CD:0F:44:1B:16:29:25:14:ED:A2:EF:13:0F:A7:46:09:78:F6
+                DirName:/C=US/ST=CA/O=Apache/OU=Pulsar Incubator/CN=localhost
+                serial:88:08:98:B3:13:D8:00:94
+
+            X509v3 Basic Constraints: 
+                CA:TRUE
+    Signature Algorithm: sha1WithRSAEncryption
+        5e:30:c5:7b:30:3e:1e:16:cd:ba:66:f1:2a:19:13:8a:1a:00:
+        08:f4:1e:8c:e4:3d:57:13:65:96:bf:07:58:55:52:37:3e:aa:
+        2c:19:de:ee:c3:92:6e:79:f3:06:0e:9a:7b:e0:02:50:c3:ef:
+        3b:84:ea:8f:e0:f0:16:a6:a6:67:8b:be:73:0e:5d:f7:88:39:
+        d3:d4:df:85:ad:7c:c1:4f:fa:55:55:6f:c2:48:4e:8e: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nnzBg6ae+ACUMPvO4Tqj+DwFqamZ4u+cw5d94g509Tfha18wU/6VVVvwkhOjoL6
+cjuOndz3Lp1HjuXJou6xdpQVfHpivAZF+mEuM4wYPunVkKWmgFo=
+-----END CERTIFICATE-----
diff --git a/integration-tests/certs/client-cert.pem b/integration-tests/certs/client-cert.pem
new file mode 100644
index 0000000..61847f2
--- /dev/null
+++ b/integration-tests/certs/client-cert.pem
@@ -0,0 +1,73 @@
+Certificate:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            88:08:98:b3:13:d8:00:99
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, ST=CA, O=Apache, OU=Pulsar Incubator, CN=localhost
+        Validity
+            Not Before: Feb 17 02:50:05 2018 GMT
+            Not After : Nov 16 00:00:00 2030 GMT
+        Subject: C=US, ST=CA, O=Apache, OU=Apache Pulsar, CN=superUser
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:cd:43:7d:98:40:f9:b0:5b:bc:ae:db:c0:0b:ad:
+                    26:90:96:e0:62:38:ed:68:b1:70:46:3b:de:44:f9:
+                    14:51:86:10:eb:ca:90:e7:88:e8:f9:91:85:e0:dd:
+                    b5:b4:14:b9:78:e3:86:d5:54:6d:68:ec:14:92:b4:
+                    f8:22:5b:05:3d:ed:31:25:65:08:05:84:ca:e6:0c:
+                    21:12:58:32:c7:1a:60:a3:4f:d2:4a:9e:28:19:7c:
+                    45:84:00:8c:89:dc:de:8a:e5:4f:88:91:cc:a4:f1:
+                    81:45:4c:7d:c2:ff:e2:c1:89:c6:12:73:95:e2:36:
+                    bd:db:ae:8b:5a:68:6a:90:51:de:2b:88:5f:aa:67:
+                    f4:a8:e3:63:dc:be:19:82:cc:9d:7f:e6:8d:fb:82:
+                    be:22:01:3d:56:13:3b:5b:04:b4:e8:c5:18:e6:2e:
+                    0d:fa:ba:4a:8d:e8:c6:5a:a1:51:9a:4a:62:d7:af:
+                    dd:b4:fc:e2:d5:cd:ae:99:6c:5c:61:56:0b:d7:0c:
+                    1a:77:5c:f5:3a:6a:54:b5:9e:33:ac:a9:75:28:9a:
+                    76:af:d0:7a:57:00:1b:91:13:31:fd:42:88:21:47:
+                    05:10:01:2f:59:bb:c7:3a:d9:e1:58:4c:1b:6c:71:
+                    b6:98:ef:dd:03:82:58:a3:32:dc:90:a1:b6:a6:1e:
+                    e1:0b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: 
+                CA:FALSE
+            Netscape Comment: 
+                OpenSSL Generated Certificate
+            X509v3 Subject Key Identifier: 
+                53:7C:D5:D1:52:97:9A:D6:D5:EA:EC:B6:0C:9B:43:39:19:73:F6:2C
+            X509v3 Authority Key Identifier: 
+                keyid:D4:7A:CD:0F:44:1B:16:29:25:14:ED:A2:EF:13:0F:A7:46:09:78:F6
+
+    Signature Algorithm: sha1WithRSAEncryption
+        e4:03:82:ff:be:df:7c:73:2a:c5:8f:7d:87:ab:95:b1:2b:e5:
+        f7:41:22:4f:28:54:84:7a:cc:fe:70:89:0f:48:e5:8a:17:e1:
+        44:ad:12:e9:a1:3a:c7:84:55:f0:7c:29:52:0a:a1:ab:cc:5b:
+        31:e5:b2:37:73:3a:8d:f2:f1:fb:e8:f6:a2:b9:ef:11:10:f8:
+        31:43:8f:af:ce:09:f4:cb:96:0e:d4:58:42:6e:86:ab:b9:03:
+        19:8b:4a:6e:ef:50:c0:7e:c9:0b:1d:2b:42:bf:eb:d0:06:05:
+        84:ea:5a:8a:22:5c:56:fa:da:2a:9f:8a:b2:90:66:8c:5e:01:
+        87:45
+-----BEGIN CERTIFICATE-----
+MIIDLjCCApegAwIBAgIJAIgImLMT2ACZMA0GCSqGSIb3DQEBBQUAMFoxCzAJBgNV
+BAYTAlVTMQswCQYDVQQIEwJDQTEPMA0GA1UEChMGQXBhY2hlMRkwFwYDVQQLExBQ
+dWxzYXIgSW5jdWJhdG9yMRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMTgwMjE3MDI1
+MDA1WhcNMzAxMTE2MDAwMDAwWjBXMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0Ex
+DzANBgNVBAoTBkFwYWNoZTEWMBQGA1UECxMNQXBhY2hlIFB1bHNhcjESMBAGA1UE
+AxMJc3VwZXJVc2VyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzUN9
+mED5sFu8rtvAC60mkJbgYjjtaLFwRjveRPkUUYYQ68qQ54jo+ZGF4N21tBS5eOOG
+1VRtaOwUkrT4IlsFPe0xJWUIBYTK5gwhElgyxxpgo0/SSp4oGXxFhACMidzeiuVP
+iJHMpPGBRUx9wv/iwYnGEnOV4ja9266LWmhqkFHeK4hfqmf0qONj3L4Zgsydf+aN
++4K+IgE9VhM7WwS06MUY5i4N+rpKjejGWqFRmkpi16/dtPzi1c2umWxcYVYL1wwa
+d1z1OmpUtZ4zrKl1KJp2r9B6VwAbkRMx/UKIIUcFEAEvWbvHOtnhWEwbbHG2mO/d
+A4JYozLckKG2ph7hCwIDAQABo3sweTAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQf
+Fh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUU3zV0VKX
+mtbV6uy2DJtDORlz9iwwHwYDVR0jBBgwFoAU1HrND0QbFiklFO2i7xMPp0YJePYw
+DQYJKoZIhvcNAQEFBQADgYEA5AOC/77ffHMqxY99h6uVsSvl90EiTyhUhHrM/nCJ
+D0jlihfhRK0S6aE6x4RV8HwpUgqhq8xbMeWyN3M6jfLx++j2ornvERD4MUOPr84J
+9MuWDtRYQm6Gq7kDGYtKbu9QwH7JCx0rQr/r0AYFhOpaiiJcVvraKp+KspBmjF4B
+h0U=
+-----END CERTIFICATE-----
diff --git a/integration-tests/certs/client-key.pem b/integration-tests/certs/client-key.pem
new file mode 100644
index 0000000..3835b3e
--- /dev/null
+++ b/integration-tests/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
+X2XvSdIhO4K2PgRLgjlzZ8RHSULglqyjB2i6TjwjFl8TsRzYr6JlV6+2cMujw4Bl
+g3a8gz071BkCgYBLP7BMkmw5kRliqxph1sffg3rLhmG0eU2elTkYtoMTVqZSnRxZ
+89FW/eMBCWkLo2BMbyMhlalQ1qFbgh1GyTkhBdzx/uwsZtiu7021dAmcq6z7ThE6
+VrBfPPyJ2jcPon/DxbrUGnAIGILMSsLVlGYB4RCehZYEto6chz8O9Xw60QKBgCnd
+us1BqviqwZC04JbQJie/j09RbS2CIQXRJ9PBNzUMXCwaVYgWP5ivI1mqQcBYTqsw
+fAqNi+aAUcQ4emLS+Ec0vzsUclzTDbRJAv+DZ8f7fWtEcfeLAYFVldLMiaRVJRDF
+OnsoIII3mGY6TFyNQKNanS8VXfheQQDsFFjoera5AoGBALXYEXkESXpw4LT6qJFz
+ktQuTZDfS6LtR14/+NkYL9c5wBC4Otkg4bNbT8xGlUjethRfpkm8xRTB6zfC1/p/
+Cg6YU1cwqlkRurAhE3PEv1dCc1IDbzou8xnwqHrd6sGPDQmQ3aEtU5eJhDZKIZfx
+nQqPGK92+Jtne7+W1mFZooxs
+-----END PRIVATE KEY-----
diff --git a/integration-tests/client.conf b/integration-tests/client.conf
new file mode 100644
index 0000000..011a6dd
--- /dev/null
+++ b/integration-tests/client.conf
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Pulsar Client configuration
+webServiceUrl=https://localhost:8443/
+brokerServiceUrl=pulsar+ssl://localhost:6651/
+tlsAllowInsecureConnection=false
+tlsTrustCertsFilePath=/pulsar/certs/cacert.pem
+authPlugin=org.apache.pulsar.client.impl.auth.AuthenticationTls
+authParams=tlsCertFile:/pulsar/certs/client-cert.pem,tlsKeyFile:/pulsar/certs/client-key.pem
+
diff --git a/integration-tests/standalone.conf b/integration-tests/standalone.conf
new file mode 100644
index 0000000..d81f493
--- /dev/null
+++ b/integration-tests/standalone.conf
@@ -0,0 +1,280 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+### --- General broker settings --- ###
+
+# Zookeeper quorum connection string
+zookeeperServers=
+
+# Deprecated. Global zookeeper quorum connection string
+globalZookeeperServers=
+
+# Configuration Store connection string
+configurationStoreServers=
+
+brokerServicePort=6650
+brokerServicePortTls=6651
+
+# Port to use to server HTTP request
+webServicePort=8080
+webServicePortTls=8443
+
+# Hostname or IP address the service binds on, default is 0.0.0.0.
+bindAddress=0.0.0.0
+
+# Hostname or IP address the service advertises to the outside world. If not set, the value of InetAddress.getLocalHost().getHostName() is used.
+advertisedAddress=localhost
+
+# Name of the cluster to which this broker belongs to
+clusterName=standalone
+
+# Zookeeper session timeout in milliseconds
+zooKeeperSessionTimeoutMillis=30000
+
+# Time to wait for broker graceful shutdown. After this time elapses, the process will be killed
+brokerShutdownTimeoutMs=3000
+
+# Enable backlog quota check. Enforces action on topic when the quota is reached
+backlogQuotaCheckEnabled=true
+
+# How often to check for topics that have reached the quota
+backlogQuotaCheckIntervalInSeconds=60
+
+# Default per-topic backlog quota limit
+backlogQuotaDefaultLimitGB=10
+
+# Enable the deletion of inactive topics
+brokerDeleteInactiveTopicsEnabled=true
+
+# How often to check for inactive topics
+brokerDeleteInactiveTopicsFrequencySeconds=60
+
+# How frequently to proactively check and purge expired messages
+messageExpiryCheckIntervalInMinutes=5
+
+# Enable check for minimum allowed client library version
+clientLibraryVersionCheckEnabled=false
+
+# Allow client libraries with no version information
+clientLibraryVersionCheckAllowUnversioned=true
+
+# Path for the file used to determine the rotation status for the broker when responding
+# to service discovery health checks
+statusFilePath=/usr/local/apache/htdocs
+
+# Max number of unacknowledged messages allowed to receive messages by a consumer on a shared subscription. Broker will stop sending
+# messages to consumer once, this limit reaches until consumer starts acknowledging messages back
+# Using a value of 0, is disabling unackeMessage limit check and consumer can receive messages without any restriction
+maxUnackedMessagesPerConsumer=50000
+
+### --- Authentication --- ###
+
+# Enable TLS
+tlsEnabled=true
+tlsCertificateFilePath=/pulsar/certs/broker-cert.pem
+tlsKeyFilePath=/pulsar/certs/broker-key.pem
+tlsTrustCertsFilePath=/pulsar/certs/cacert.pem
+tlsAllowInsecureConnection=false
+
+anonymousUserRole=anonymous
+
+# Enable authentication
+authenticationEnabled=true
+
+# Autentication provider name list, which is comma separated list of class names
+authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderTls,org.apache.pulsar.broker.authentication.AuthenticationProviderToken
+
+# Enforce authorization
+authorizationEnabled=true
+
+tokenSecretKey=file:///pulsar/tokens/secret.key
+
+# Role names that are treated as "super-user", meaning they will be able to do all admin
+# operations and publish/consume from all topics
+superUserRoles=localhost,superUser
+
+# Authentication settings of the broker itself. Used when the broker connects to other brokers,
+# either in same or other clusters
+brokerClientAuthenticationPlugin=
+brokerClientAuthenticationParameters=
+
+### --- BookKeeper Client --- ###
+
+# Authentication plugin to use when connecting to bookies
+bookkeeperClientAuthenticationPlugin=
+
+# BookKeeper auth plugin implementatation specifics parameters name and values
+bookkeeperClientAuthenticationParametersName=
+bookkeeperClientAuthenticationParameters=
+
+# Timeout for BK add / read operations
+bookkeeperClientTimeoutInSeconds=30
+
+# Speculative reads are initiated if a read request doesn't complete within a certain time
+# Using a value of 0, is disabling the speculative reads
+bookkeeperClientSpeculativeReadTimeoutInMillis=0
+
+# Enable bookies health check. Bookies that have more than the configured number of failure within
+# the interval will be quarantined for some time. During this period, new ledgers won't be created
+# on these bookies
+bookkeeperClientHealthCheckEnabled=true
+bookkeeperClientHealthCheckIntervalSeconds=60
+bookkeeperClientHealthCheckErrorThresholdPerInterval=5
+bookkeeperClientHealthCheckQuarantineTimeInSeconds=1800
+
+# Enable rack-aware bookie selection policy. BK will chose bookies from different racks when
+# forming a new bookie ensemble
+bookkeeperClientRackawarePolicyEnabled=true
+
+# Enable region-aware bookie selection policy. BK will chose bookies from
+# different regions and racks when forming a new bookie ensemble
+# If enabled, the value of bookkeeperClientRackawarePolicyEnabled is ignored
+bookkeeperClientRegionawarePolicyEnabled=false
+
+# Enable/disable reordering read sequence on reading entries.
+bookkeeperClientReorderReadSequenceEnabled=false
+
+# Enable bookie isolation by specifying a list of bookie groups to choose from. Any bookie
+# outside the specified groups will not be used by the broker
+bookkeeperClientIsolationGroups=
+
+### --- Managed Ledger --- ###
+
+# Number of bookies to use when creating a ledger
+managedLedgerDefaultEnsembleSize=1
+
+# Number of copies to store for each message
+managedLedgerDefaultWriteQuorum=1
+
+# Number of guaranteed copies (acks to wait before write is complete)
+managedLedgerDefaultAckQuorum=1
+
+# Amount of memory to use for caching data payload in managed ledger. This memory
+# is allocated from JVM direct memory and it's shared across all the topics
+# running  in the same broker
+managedLedgerCacheSizeMB=1024
+
+# Threshold to which bring down the cache level when eviction is triggered
+managedLedgerCacheEvictionWatermark=0.9
+
+# Rate limit the amount of writes generated by consumer acking the messages
+managedLedgerDefaultMarkDeleteRateLimit=0.1
+
+# Max number of entries to append to a ledger before triggering a rollover
+# A ledger rollover is triggered on these conditions
+#  * Either the max rollover time has been reached
+#  * or max entries have been written to the ledged and at least min-time
+#    has passed
+managedLedgerMaxEntriesPerLedger=50000
+
+# Minimum time between ledger rollover for a topic
+managedLedgerMinLedgerRolloverTimeMinutes=10
+
+# Maximum time before forcing a ledger rollover for a topic
+managedLedgerMaxLedgerRolloverTimeMinutes=240
+
+# Max number of entries to append to a cursor ledger
+managedLedgerCursorMaxEntriesPerLedger=50000
+
+# Max time before triggering a rollover on a cursor ledger
+managedLedgerCursorRolloverTimeInSeconds=14400
+
+
+
+### --- Load balancer --- ###
+
+# Enable load balancer
+loadBalancerEnabled=false
+
+# Strategy to assign a new bundle
+loadBalancerPlacementStrategy=weightedRandomSelection
+
+# Percentage of change to trigger load report update
+loadBalancerReportUpdateThresholdPercentage=10
+
+# maximum interval to update load report
+loadBalancerReportUpdateMaxIntervalMinutes=15
+
+# Frequency of report to collect
+loadBalancerHostUsageCheckIntervalMinutes=1
+
+# Load shedding interval. Broker periodically checks whether some traffic should be offload from
+# some over-loaded broker to other under-loaded brokers
+loadBalancerSheddingIntervalMinutes=30
+
+# Prevent the same topics to be shed and moved to other broker more that once within this timeframe
+loadBalancerSheddingGracePeriodMinutes=30
+
+# Usage threshold to determine a broker as under-loaded
+loadBalancerBrokerUnderloadedThresholdPercentage=1
+
+# Usage threshold to determine a broker as over-loaded
+loadBalancerBrokerOverloadedThresholdPercentage=85
+
+# Interval to update namespace bundle resource quotat
+loadBalancerResourceQuotaUpdateIntervalMinutes=15
+
+# Usage threshold to determine a broker is having just right level of load
+loadBalancerBrokerComfortLoadLevelPercentage=65
+
+# enable/disable namespace bundle auto split
+loadBalancerAutoBundleSplitEnabled=false
+
+# interval to detect & split hot namespace bundle
+loadBalancerNamespaceBundleSplitIntervalMinutes=15
+
+# maximum topics in a bundle, otherwise bundle split will be triggered
+loadBalancerNamespaceBundleMaxTopics=1000
+
+# maximum sessions (producers + consumers) in a bundle, otherwise bundle split will be triggered
+loadBalancerNamespaceBundleMaxSessions=1000
+
+# maximum msgRate (in + out) in a bundle, otherwise bundle split will be triggered
+loadBalancerNamespaceBundleMaxMsgRate=1000
+
+# maximum bandwidth (in + out) in a bundle, otherwise bundle split will be triggered
+loadBalancerNamespaceBundleMaxBandwidthMbytes=100
+
+# maximum number of bundles in a namespace
+loadBalancerNamespaceMaximumBundles=128
+
+### --- Replication --- ###
+
+# Enable replication metrics
+replicationMetricsEnabled=true
+
+# Max number of connections to open for each broker in a remote cluster
+# More connections host-to-host lead to better throughput over high-latency
+# links.
+replicationConnectionsPerBroker=16
+
+# Replicator producer queue size
+replicationProducerQueueSize=1000
+
+# Default message retention time
+defaultRetentionTimeInMinutes=0
+
+# Default retention size
+defaultRetentionSizeInMB=0
+
+# How often to check whether the connections are still alive
+keepAliveIntervalSeconds=30
+
+# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
+brokerServicePurgeInactiveFrequencyInSeconds=60
diff --git a/pulsar-test-service-start.sh b/pulsar-test-service-start.sh
new file mode 100755
index 0000000..47735ec
--- /dev/null
+++ b/pulsar-test-service-start.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -e
+
+SRC_DIR=$(git rev-parse --show-toplevel)
+cd $SRC_DIR
+
+IMAGE_NAME=pulsar-client-go-test:latest
+
+if [[ -f /.dockerenv ]]; then
+    # When running tests inside docker
+    PULSAR_ADMIN=/pulsar/bin/pulsar-admin
+    /pulsar/bin/pulsar-daemon start standalone --no-functions-worker --no-stream-storage
+else
+    docker build -t ${IMAGE_NAME} .
+
+    docker kill pulsar-client-go-test || true
+    docker run -d --rm --name pulsar-client-go-test \
+                -p 8080:8080 \
+                -p 6650:6650 \
+                -p 8443:8843 \
+                -p 6651:6651 \
+                ${IMAGE_NAME} \
+                /pulsar/bin/pulsar standalone \
+                    --no-functions-worker --no-stream-storage
+
+    PULSAR_ADMIN="docker exec -it pulsar-client-go-test /pulsar/bin/pulsar-admin"
+fi
+
+echo "-- Wait for Pulsar service to be ready"
+until curl http://localhost:8080/metrics > /dev/null 2>&1 ; do sleep 1; done
+
+echo "-- Pulsar service is ready -- Configure permissions"
+
+# Create "standalone" cluster
+$PULSAR_ADMIN clusters create \
+        standalone \
+        --url http://localhost:8080/ \
+        --url-secure https://localhost:8443/ \
+        --broker-url pulsar://localhost:6650/ \
+        --broker-url-secure pulsar+ssl://localhost:6651/
+
+# Create "public" tenant
+$PULSAR_ADMIN tenants create public -r "anonymous" -c "standalone"
+
+# Create "public/default" with no auth required
+$PULSAR_ADMIN namespaces create public/default
+$PULSAR_ADMIN namespaces grant-permission public/default \
+                        --actions produce,consume \
+                        --role "anonymous"
+
+# Create "private" tenant
+$PULSAR_ADMIN tenants create private
+
+# Create "private/auth" with required authentication
+$PULSAR_ADMIN namespaces create private/auth
+$PULSAR_ADMIN namespaces grant-permission private/auth \
+                        --actions produce,consume \
+                        --role "token-principal"
+
+echo "-- Ready to start tests"
diff --git a/pulsar-test-service-stop.sh b/pulsar-test-service-stop.sh
new file mode 100755
index 0000000..eafccd9
--- /dev/null
+++ b/pulsar-test-service-stop.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -e
+
+SRC_DIR=$(git rev-parse --show-toplevel)
+cd $SRC_DIR
+
+IMAGE_NAME=pulsar-client-go-test:latest
+
+if [[ -f /.dockerenv ]]; then
+    # When running tests inside docker
+    /pulsar/bin/pulsar-daemon stop standalone
+else
+    docker kill pulsar-client-go-test
+fi
+
+echo "Stopped Test Pulsar Service"