@@ -3,7 +3,7 @@ name: Build
33on :
44 push :
55 branches :
6- - master
6+ - ci-integration-tests-simplify
77 pull_request :
88 types : [ opened, synchronize, reopened ]
99
@@ -118,21 +118,8 @@ jobs:
118118 name : ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}
119119 path : /home/runner/.ccm/test
120120 retention-days : 5
121- integration-auth-cassandra :
122- timeout-minutes : 15
123- needs :
124- - build
125- name : Integration Tests with auth
126- runs-on : ubuntu-latest
127- strategy :
128- fail-fast : false
129- matrix :
130- go : [ '1.22', '1.23' ]
131- cassandra_version : [ '4.0.13' ]
132- compressor : [ "snappy" ]
133- tags : [ "integration" ]
134-
135- steps :
121+ - name : Delete cluster
122+ run : ccm remove
136123 - uses : actions/checkout@v3
137124 - uses : actions/setup-go@v4
138125 with :
@@ -159,7 +146,7 @@ jobs:
159146 "authorizer: CassandraAuthorizer"
160147 "enable_user_defined_functions: true"
161148 )
162-
149+
163150 if [[ $VERSION == 3.*.* ]]; then
164151 conf+=(
165152 "rpc_server_type: sync"
@@ -179,27 +166,112 @@ jobs:
179166 "materialized_views_enabled: true"
180167 )
181168 fi
182-
169+
183170 ccm remove test || true
184-
171+
185172 ccm create test -v $VERSION -n 1 -d --vnodes --jvm_arg="-Xmx256m -XX:NewSize=100m"
186173 ccm updateconf "${conf[@]}"
187-
174+
188175 rm -rf $HOME/.ccm/test/node1/data/system_auth
189-
176+
190177 export JVM_EXTRA_OPTS=" -Dcassandra.test.fail_writes_ks=test -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"
191-
178+
192179 ccm start --wait-for-binary-proto --verbose
193180 ccm status
194181 ccm node1 nodetool status
195-
182+
196183 args="-gocql.timeout=60s -runssl -proto=4 -rf=3 -clusterSize=1 -autowait=2000ms -compressor=${{ matrix.compressor }} -gocql.cversion=$VERSION -cluster=$(ccm liveset) ./..."
197-
184+
198185 echo "args=$args" >> $GITHUB_ENV
199186 echo "JVM_EXTRA_OPTS=$JVM_EXTRA_OPTS" >> $GITHUB_ENV
200187 sleep 30s
201188 - name : Integration tests
202189 run : |
203190 source ~/venv/bin/activate
204191 export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
205- go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}
192+ go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }
193+ # integration-auth-cassandra:
194+ # timeout-minutes: 15
195+ # needs:
196+ # - build
197+ # name: Integration Tests with auth
198+ # runs-on: ubuntu-latest
199+ # strategy:
200+ # fail-fast: false
201+ # matrix:
202+ # go: [ '1.22', '1.23' ]
203+ # cassandra_version: [ '4.0.13' ]
204+ # compressor: [ "snappy" ]
205+ # tags: [ "integration" ]
206+ #
207+ # steps:
208+ # - uses: actions/checkout@v3
209+ # - uses: actions/setup-go@v4
210+ # with:
211+ # go-version: ${{ matrix.go }}
212+ # - name: Setup environment
213+ # uses: ./.github/actions/setup-environment
214+ # - name: Start cassandra nodes
215+ # run: |
216+ # source ~/venv/bin/activate
217+ # VERSION=${{ matrix.cassandra_version }}
218+ # keypath="$(pwd)/testdata/pki"
219+ # conf=(
220+ # "client_encryption_options.enabled: true"
221+ # "client_encryption_options.keystore: $keypath/.keystore"
222+ # "client_encryption_options.keystore_password: cassandra"
223+ # "client_encryption_options.require_client_auth: true"
224+ # "client_encryption_options.truststore: $keypath/.truststore"
225+ # "client_encryption_options.truststore_password: cassandra"
226+ # "concurrent_reads: 2"
227+ # "concurrent_writes: 2"
228+ # "write_request_timeout_in_ms: 5000"
229+ # "read_request_timeout_in_ms: 5000"
230+ # "authenticator: PasswordAuthenticator"
231+ # "authorizer: CassandraAuthorizer"
232+ # "enable_user_defined_functions: true"
233+ # )
234+ #
235+ # if [[ $VERSION == 3.*.* ]]; then
236+ # conf+=(
237+ # "rpc_server_type: sync"
238+ # "rpc_min_threads: 2"
239+ # "rpc_max_threads: 2"
240+ # "enable_user_defined_functions: true"
241+ # "enable_materialized_views: true"
242+ # )
243+ # elif [[ $VERSION == 4.0.* ]]; then
244+ # conf+=(
245+ # "enable_user_defined_functions: true"
246+ # "enable_materialized_views: true"
247+ # )
248+ # else
249+ # conf+=(
250+ # "user_defined_functions_enabled: true"
251+ # "materialized_views_enabled: true"
252+ # )
253+ # fi
254+ #
255+ # ccm remove test || true
256+ #
257+ # ccm create test -v $VERSION -n 1 -d --vnodes --jvm_arg="-Xmx256m -XX:NewSize=100m"
258+ # ccm updateconf "${conf[@]}"
259+ #
260+ # rm -rf $HOME/.ccm/test/node1/data/system_auth
261+ #
262+ # export JVM_EXTRA_OPTS=" -Dcassandra.test.fail_writes_ks=test -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"
263+ #
264+ # ccm start --wait-for-binary-proto --verbose
265+ # ccm status
266+ # ccm node1 nodetool status
267+ #
268+ # args="-gocql.timeout=60s -runssl -proto=4 -rf=3 -clusterSize=1 -autowait=2000ms -compressor=${{ matrix.compressor }} -gocql.cversion=$VERSION -cluster=$(ccm liveset) ./..."
269+ #
270+ # echo "args=$args" >> $GITHUB_ENV
271+ # echo "JVM_EXTRA_OPTS=$JVM_EXTRA_OPTS" >> $GITHUB_ENV
272+ # sleep 30s
273+ # - name: Integration tests
274+ # run: |
275+ # source ~/venv/bin/activate
276+ # export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
277+ # go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}
0 commit comments