Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for tests. #4063

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions adapters/adapterstest/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory contains the json test framework for adapters. Perhaps it could be moved up a level.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package adapterstest

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
11 changes: 11 additions & 0 deletions analytics/clients/http_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory only contains a single line abstraction around the default http client. There is no need for tests.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package clients

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestGetDefaultHttpInstance(t *testing.T) {
assert.NotNil(t, GetDefaultHttpInstance())
}
8 changes: 8 additions & 0 deletions analytics/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory only contains data models and interfaces. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package analytics

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions exchange/entities/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory only contains data models. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package entities

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions hooks/hookstage/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could benefit from tests for some types like ChangeSetBids.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package hookstage

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions modules/generator/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory only contains optional pre-build scripts. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package generator

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions modules/moduledeps/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory only contains data models. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package moduledeps

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions pbs/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory only contains Google Captcha code for the opt-out form. Tests should be possible, just will be complicated with emulating http responses and html form processing.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package pbs

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions stored_requests/caches/cachestest/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory only contains test helper methods There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package cachestest

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions stored_requests/caches/nil_cache/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory implements a no-op cache. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package nil_cache

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
3 changes: 0 additions & 3 deletions tests_where_go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ func FirstFunc[Slice ~[]T, T any](s Slice, matchFunc func(T) bool) (T, bool) {

// EveryDirWithGoCodeHasTests asserts that every directory in the current working directory
func EveryDirWithGoCodeHasTests(t *testing.T, opts ...EveryDirOpt) {
// TODO: Ensure that every directory with go code in it has at least one test
t.Skip("Ensure every dir with go code has at least one test file.")

wd, err := os.Getwd()
require.NoError(t, err)
everyDirOptions := newEveryDirOptions(opts...)
Expand Down
8 changes: 8 additions & 0 deletions util/randomutil/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory abstracts a random generator specifically for reliable tests. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package randomutil

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions util/timeutil/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory abstracts a the clock specifically for reliable tests. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package timeutil

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
8 changes: 8 additions & 0 deletions util/uuidutil/dummy_test.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory abstracts a random generator specifically for reliable tests. There is nothing to test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package uuidutil

import "testing"

// TODO: Add real tests and remove this file
func TestDummy(t *testing.T) {
t.Skip("Ensure that at least one real test exists")
}
Loading