diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b4dcf7cb8..bfa03bc49 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,6 +47,24 @@ jobs: id: get_author run: echo "::set-output name=author::$(git log -1 --pretty=format:'%an <%ae> sha1={%H}')" + - name: License Header Verification + working-directory: ci/it + run: | + LICENSE_COMMENT="// Copyright Quesma, licensed under the Elastic License 2.0. + // SPDX-License-Identifier: Elastic-2.0" + failed=false + while IFS= read -r -d '' file; do + file_content=$(< "$file") + + if [[ "$file_content" != "$LICENSE_COMMENT"* ]]; then + echo "License header missing or incorrect in file: $file" + failed=true + fi + done < <(find . -type f -name "*.go" -print0) + if [ "$failed" = true ]; then + exit 1 + fi + - name: Run integration tests working-directory: ci/it run: go test -v diff --git a/ci/it/integration_test.go b/ci/it/integration_test.go index 21f60f02d..8e304996e 100644 --- a/ci/it/integration_test.go +++ b/ci/it/integration_test.go @@ -1,3 +1,6 @@ +// Copyright Quesma, licensed under the Elastic License 2.0. +// SPDX-License-Identifier: Elastic-2.0 + package it import ( diff --git a/ci/it/testcases/base.go b/ci/it/testcases/base.go index 363ef9dd5..7346a746e 100644 --- a/ci/it/testcases/base.go +++ b/ci/it/testcases/base.go @@ -1,3 +1,6 @@ +// Copyright Quesma, licensed under the Elastic License 2.0. +// SPDX-License-Identifier: Elastic-2.0 + package testcases import ( diff --git a/ci/it/testcases/test_dual_write_and_common_table.go b/ci/it/testcases/test_dual_write_and_common_table.go index af698b4a9..068716690 100644 --- a/ci/it/testcases/test_dual_write_and_common_table.go +++ b/ci/it/testcases/test_dual_write_and_common_table.go @@ -1,3 +1,6 @@ +// Copyright Quesma, licensed under the Elastic License 2.0. +// SPDX-License-Identifier: Elastic-2.0 + package testcases import ( diff --git a/ci/it/testcases/test_reading_clickhouse_tables.go b/ci/it/testcases/test_reading_clickhouse_tables.go index ca0f7b3e8..3ee99832d 100644 --- a/ci/it/testcases/test_reading_clickhouse_tables.go +++ b/ci/it/testcases/test_reading_clickhouse_tables.go @@ -1,3 +1,6 @@ +// Copyright Quesma, licensed under the Elastic License 2.0. +// SPDX-License-Identifier: Elastic-2.0 + package testcases import ( diff --git a/ci/it/testcases/test_transparent_proxy.go b/ci/it/testcases/test_transparent_proxy.go index 1becffa2d..748449035 100644 --- a/ci/it/testcases/test_transparent_proxy.go +++ b/ci/it/testcases/test_transparent_proxy.go @@ -1,3 +1,6 @@ +// Copyright Quesma, licensed under the Elastic License 2.0. +// SPDX-License-Identifier: Elastic-2.0 + package testcases import ( diff --git a/ci/it/testcases/test_two_pipelines.go b/ci/it/testcases/test_two_pipelines.go index 27952da65..ecda354c3 100644 --- a/ci/it/testcases/test_two_pipelines.go +++ b/ci/it/testcases/test_two_pipelines.go @@ -1,3 +1,6 @@ +// Copyright Quesma, licensed under the Elastic License 2.0. +// SPDX-License-Identifier: Elastic-2.0 + package testcases import ( diff --git a/ci/it/testcases/utils.go b/ci/it/testcases/utils.go index e52d48da9..5c69d57bb 100644 --- a/ci/it/testcases/utils.go +++ b/ci/it/testcases/utils.go @@ -1,3 +1,6 @@ +// Copyright Quesma, licensed under the Elastic License 2.0. +// SPDX-License-Identifier: Elastic-2.0 + package testcases import (