From c3d7b2a316a53d6e0866efca5b8aa723a8db1dca Mon Sep 17 00:00:00 2001 From: Nont Date: Mon, 28 Apr 2025 21:29:08 -0500 Subject: [PATCH] [Antithesis] Fix lint and rename Dockerfile Signed-off-by: Nont --- tests/antithesis/README.md | 2 +- .../{Dockerfile.client => Dockerfile} | 0 .../test-template/entrypoint/entrypoint.go | 18 +++++++++++++++++- .../serial_driver_delete_keys.go | 19 ++++++++++++++++++- 4 files changed, 36 insertions(+), 3 deletions(-) rename tests/antithesis/test-template/{Dockerfile.client => Dockerfile} (100%) diff --git a/tests/antithesis/README.md b/tests/antithesis/README.md index 1c75e39372bf..c25b23fc3fa7 100644 --- a/tests/antithesis/README.md +++ b/tests/antithesis/README.md @@ -7,7 +7,7 @@ This directory enables integration of Antithesis with etcd. There are 4 containe Run this command from the `antithesis/test-template` directory: ```bash -docker build . -f Dockerfile.client -t etcd-client:latest +docker build . -f Dockerfile -t etcd-client:latest ``` ### 2. (Optional) Check the Image Locally diff --git a/tests/antithesis/test-template/Dockerfile.client b/tests/antithesis/test-template/Dockerfile similarity index 100% rename from tests/antithesis/test-template/Dockerfile.client rename to tests/antithesis/test-template/Dockerfile diff --git a/tests/antithesis/test-template/entrypoint/entrypoint.go b/tests/antithesis/test-template/entrypoint/entrypoint.go index a59783d023f2..f95c276c2eea 100644 --- a/tests/antithesis/test-template/entrypoint/entrypoint.go +++ b/tests/antithesis/test-template/entrypoint/entrypoint.go @@ -1,3 +1,19 @@ +// Copyright 2025 The etcd Authors +// +// Licensed 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. + +//go:build cgo && amd64 + package main import ( @@ -13,7 +29,7 @@ import ( // Sleep duration const SLEEP = 10 -// check health of all etcd nodes +// CheckHealth checks health of all etcd nodes func CheckHealth() bool { nodeOptions := []string{"etcd0", "etcd1", "etcd2"} diff --git a/tests/antithesis/test-template/go-delete-keys/serial_driver_delete_keys.go b/tests/antithesis/test-template/go-delete-keys/serial_driver_delete_keys.go index f9e274c39b10..918fe7d40cba 100644 --- a/tests/antithesis/test-template/go-delete-keys/serial_driver_delete_keys.go +++ b/tests/antithesis/test-template/go-delete-keys/serial_driver_delete_keys.go @@ -1,3 +1,19 @@ +// Copyright 2025 The etcd Authors +// +// Licensed 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. + +//go:build cgo && amd64 + package main import ( @@ -102,4 +118,5 @@ func DeleteKeys() { func main() { DeleteKeys() -} \ No newline at end of file +} +