Remove subscription_stability_test.go and improve test variable naming
Some checks failed
Go / build-and-release (push) Has been cancelled
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:
@@ -172,8 +172,8 @@ func TestQueryForIds(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 {
|
||||
testEvent = ev
|
||||
break
|
||||
}
|
||||
@@ -187,9 +187,9 @@ func TestQueryForIds(t *testing.T) {
|
||||
if testEvent != nil {
|
||||
// Get the first tag with at least 2 elements and first element of length 1
|
||||
var testTag *tag.T
|
||||
for _, tag := range *testEvent.Tags {
|
||||
if tag.Len() >= 2 && len(tag.Key()) == 1 {
|
||||
testTag = tag
|
||||
for _, tg := range *testEvent.Tags {
|
||||
if tg.Len() >= 2 && len(tg.Key()) == 1 {
|
||||
testTag = tg
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -221,11 +221,11 @@ func TestQueryForIds(t *testing.T) {
|
||||
|
||||
// Check if the event has the tag we're looking for
|
||||
var hasTag bool
|
||||
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 {
|
||||
if utils.FastEqual(
|
||||
tag.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tag.Value(), testTag.Value()) {
|
||||
tg.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tg.Value(), testTag.Value()) {
|
||||
hasTag = true
|
||||
break
|
||||
}
|
||||
@@ -325,11 +325,11 @@ func TestQueryForIds(t *testing.T) {
|
||||
|
||||
// Check if the event has the tag we're looking for
|
||||
var hasTag bool
|
||||
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 {
|
||||
if utils.FastEqual(
|
||||
tag.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tag.Value(), testTag.Value()) {
|
||||
tg.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tg.Value(), testTag.Value()) {
|
||||
hasTag = true
|
||||
break
|
||||
}
|
||||
@@ -393,11 +393,11 @@ func TestQueryForIds(t *testing.T) {
|
||||
|
||||
// Check if the event has the tag we're looking for
|
||||
var hasTag bool
|
||||
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 {
|
||||
if utils.FastEqual(
|
||||
tag.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tag.Value(), testTag.Value()) {
|
||||
tg.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tg.Value(), testTag.Value()) {
|
||||
hasTag = true
|
||||
break
|
||||
}
|
||||
@@ -454,11 +454,11 @@ func TestQueryForIds(t *testing.T) {
|
||||
|
||||
// Check if the event has the tag we're looking for
|
||||
var hasTag bool
|
||||
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 {
|
||||
if utils.FastEqual(
|
||||
tag.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tag.Value(), testTag.Value()) {
|
||||
tg.Key(), testTag.Key(),
|
||||
) && utils.FastEqual(tg.Value(), testTag.Value()) {
|
||||
hasTag = true
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user