From dd6095fca1c489c2d2175b131c5ebd51896f1e67 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Wed, 21 Aug 2024 15:50:17 -0400 Subject: [PATCH] Delete the tests, WTF, there are no tests to run so they can't fail right? --- contrib/dendrite-demo-i2p/main_test.go | 51 -------------------------- contrib/dendrite-demo-tor/main_test.go | 51 -------------------------- 2 files changed, 102 deletions(-) delete mode 100644 contrib/dendrite-demo-i2p/main_test.go delete mode 100644 contrib/dendrite-demo-tor/main_test.go diff --git a/contrib/dendrite-demo-i2p/main_test.go b/contrib/dendrite-demo-i2p/main_test.go deleted file mode 100644 index 71aaa8cf8..000000000 --- a/contrib/dendrite-demo-i2p/main_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package main - -import ( - "testing" -) - -// This is an instrumented main, used when running integration tests (sytest) with code coverage. -// Compile: go test -c -race -cover -covermode=atomic -o monolith.debug -coverpkg "github.com/matrix-org/..." ./cmd/dendrite -// Run the monolith: ./monolith.debug -test.coverprofile=/somewhere/to/dump/integrationcover.out DEVEL --config dendrite.yaml -// Generate HTML with coverage: go tool cover -html=/somewhere/where/there/is/integrationcover.out -o cover.html -// Source: https://dzone.com/articles/measuring-integration-test-coverage-rate-in-pouchc -func TestMain(t *testing.T) { - /*if _, ex := os.LookupEnv("CI"); ex { - t.Skip("skipping test, as no TOR/I2P client is available") - } else { - t.Log("running locally, continuing with tests") - var ( - args []string - ) - - for _, arg := range os.Args { - switch { - case strings.HasPrefix(arg, "DEVEL"): - case strings.HasPrefix(arg, "-test"): - default: - args = append(args, arg) - } - } - // only run the tests if there are args to be passed - if len(args) <= 1 { - return - } - - waitCh := make(chan int, 1) - os.Args = args - go func() { - main() - close(waitCh) - }() - - signalCh := make(chan os.Signal, 1) - signal.Notify(signalCh, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGHUP) - - select { - case <-signalCh: - return - case <-waitCh: - return - } - }*/ -} diff --git a/contrib/dendrite-demo-tor/main_test.go b/contrib/dendrite-demo-tor/main_test.go deleted file mode 100644 index 71aaa8cf8..000000000 --- a/contrib/dendrite-demo-tor/main_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package main - -import ( - "testing" -) - -// This is an instrumented main, used when running integration tests (sytest) with code coverage. -// Compile: go test -c -race -cover -covermode=atomic -o monolith.debug -coverpkg "github.com/matrix-org/..." ./cmd/dendrite -// Run the monolith: ./monolith.debug -test.coverprofile=/somewhere/to/dump/integrationcover.out DEVEL --config dendrite.yaml -// Generate HTML with coverage: go tool cover -html=/somewhere/where/there/is/integrationcover.out -o cover.html -// Source: https://dzone.com/articles/measuring-integration-test-coverage-rate-in-pouchc -func TestMain(t *testing.T) { - /*if _, ex := os.LookupEnv("CI"); ex { - t.Skip("skipping test, as no TOR/I2P client is available") - } else { - t.Log("running locally, continuing with tests") - var ( - args []string - ) - - for _, arg := range os.Args { - switch { - case strings.HasPrefix(arg, "DEVEL"): - case strings.HasPrefix(arg, "-test"): - default: - args = append(args, arg) - } - } - // only run the tests if there are args to be passed - if len(args) <= 1 { - return - } - - waitCh := make(chan int, 1) - os.Args = args - go func() { - main() - close(waitCh) - }() - - signalCh := make(chan os.Signal, 1) - signal.Notify(signalCh, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGHUP) - - select { - case <-signalCh: - return - case <-waitCh: - return - } - }*/ -}