Skip to content

Commit

Permalink
Add license headers to ITs (#884)
Browse files Browse the repository at this point in the history
Addressing [review
feedback](#876 (comment))
for which PR has been merged prematurely
  • Loading branch information
mieciu authored Oct 14, 2024
1 parent 0fd545e commit e97ce49
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ci/it/integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Quesma, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

package it

import (
Expand Down
3 changes: 3 additions & 0 deletions ci/it/testcases/base.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Quesma, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

package testcases

import (
Expand Down
3 changes: 3 additions & 0 deletions ci/it/testcases/test_dual_write_and_common_table.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Quesma, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

package testcases

import (
Expand Down
3 changes: 3 additions & 0 deletions ci/it/testcases/test_reading_clickhouse_tables.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Quesma, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

package testcases

import (
Expand Down
3 changes: 3 additions & 0 deletions ci/it/testcases/test_transparent_proxy.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Quesma, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

package testcases

import (
Expand Down
3 changes: 3 additions & 0 deletions ci/it/testcases/test_two_pipelines.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Quesma, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

package testcases

import (
Expand Down
3 changes: 3 additions & 0 deletions ci/it/testcases/utils.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Quesma, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

package testcases

import (
Expand Down

0 comments on commit e97ce49

Please sign in to comment.