Remove subscription_stability_test.go and improve test variable naming
Some checks failed
Go / build-and-release (push) Has been cancelled

Deleted `subscription_stability_test.go` to clean up unused or redundant code. Updated naming in test files for improved readability, replacing `tag` with `tg` for consistency. Also updated the `github.com/klauspost/compress` dependency to v1.18.2.
This commit is contained in:
2025-12-01 18:47:15 +00:00
parent 869006c4c3
commit 2166ff7013
12 changed files with 81 additions and 547 deletions

View File

@@ -581,8 +581,8 @@ func TestQueryEventsByTag(t *testing.T) {
for _, ev := range events {
if ev.Tags != nil && ev.Tags.Len() > 0 {
// Find a tag with at least 2 elements and first element of length 1
for _, tag := range *ev.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
for _, tg := range *ev.Tags {
if tg.Len() >= 2 && len(tg.Key()) == 1 {
testTagEvent = ev
break
}
@@ -600,9 +600,9 @@ func TestQueryEventsByTag(t *testing.T) {
// Get the first tag with at least 2 elements and first element of length 1
var testTag *tag.T
for _, tag := range *testTagEvent.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
testTag = tag
for _, tg := range *testTagEvent.Tags {
if tg.Len() >= 2 && len(tg.Key()) == 1 {
testTag = tg
break
}
}
@@ -627,10 +627,10 @@ func TestQueryEventsByTag(t *testing.T) {
// Verify all events have the tag
for i, ev := range evs {
var hasTag bool
for _, tag := range *ev.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
if utils.FastEqual(tag.Key(), testTag.Key()) &&
utils.FastEqual(tag.Value(), testTag.Value()) {
for _, tg := range *ev.Tags {
if tg.Len() >= 2 && len(tg.Key()) == 1 {
if utils.FastEqual(tg.Key(), testTag.Key()) &&
utils.FastEqual(tg.Value(), testTag.Value()) {
hasTag = true
break
}