Skip to content

Commit

Permalink
Workflow and test minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: Alok Kumar Singh <[email protected]>
  • Loading branch information
akstron committed Nov 29, 2024
1 parent 35c26b5 commit ddf4fc0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci-e2e-cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
jaeger-version: [v1, v2]
skip-apply-schema: [true, false]
create-schema: [manual, auto]
version:
- distribution: cassandra
major: 4.x
Expand All @@ -34,7 +34,7 @@ jobs:
# Exclude v1 as create schema on fly is available for v2 only
- jaeger-version: v1
skip-apply-schema: true
name: ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.jaeger-version }} ${{ matrix.skip-apply-schema == true && 'auto' || 'manual' }}
name: ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.jaeger-version }} ${{ matrix.create-schema }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand All @@ -51,7 +51,8 @@ jobs:
id: test-execution
run: bash scripts/cassandra-integration-test.sh ${{ matrix.version.major }} ${{ matrix.version.schema }} ${{ matrix.jaeger-version }}
env:
CASSANDRA_CREATE_SCHEMA: ${{ matrix.skip-apply-schema }}
CASSANDRA_CREATE_SCHEMA: ${{ matrix.create-schema == 'auto' && true || false }}
SKIP_APPLY_SCHEMA: ${{ matrix.create-schema == 'auto' && true || false }}

- name: Upload coverage to codecov
uses: ./.github/actions/upload-codecov
Expand Down
5 changes: 5 additions & 0 deletions pkg/cassandra/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,9 @@ func TestConfigSchemaValidation(t *testing.T) {
cfg.Schema.CompactionWindow = time.Minute - 1
err = cfg.Validate()
require.Error(t, err)

cfg.Schema.CompactionWindow = time.Minute
cfg.Schema.DependenciesTTL = time.Second - 1
err = cfg.Validate()
require.Error(t, err)
}
2 changes: 1 addition & 1 deletion pkg/cassandra/config/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (*schemaCreator) getQueriesFromBytes(queryFile []byte) ([]string, error) {
}

if len(queryString) > 0 {
return nil, errors.New(`invalid template`)
return nil, errors.New(`query exists in template without ";"`)
}

return queries, nil
Expand Down

0 comments on commit ddf4fc0

Please sign in to comment.