From 5da00556182e2cae8ee1a4451f3ec69a665b7246 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Thu, 17 Jun 2021 21:58:14 +0200 Subject: [PATCH] Use standard library only --- go.mod | 6 ------ go.sum | 13 ------------- shutdown_test.go | 18 ++++++++++++------ 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index c1dfc0d..87b0ace 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,3 @@ module git.jlel.se/jlelse/go-shutdowner go 1.16 - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/stretchr/testify v1.7.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect -) diff --git a/go.sum b/go.sum index c221f64..e69de29 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/shutdown_test.go b/shutdown_test.go index cf36862..5614a93 100644 --- a/shutdown_test.go +++ b/shutdown_test.go @@ -3,8 +3,6 @@ package goshutdowner import ( "os" "testing" - - "github.com/stretchr/testify/assert" ) func Test_shutdowner(t *testing.T) { @@ -18,9 +16,15 @@ func Test_shutdowner(t *testing.T) { testBool2 = true }) s.ShutdownAndWait() - assert.True(t, testBool1) - assert.True(t, testBool2) - assert.False(t, testBool3) + if testBool1 != true { + t.Fail() + } + if testBool2 != true { + t.Fail() + } + if testBool3 != false { + t.Fail() + } }) t.Run("Signal test", func(t *testing.T) { var s Shutdowner @@ -30,6 +34,8 @@ func Test_shutdowner(t *testing.T) { }) s.quit <- os.Interrupt s.Wait() - assert.True(t, testBool1) + if testBool1 != true { + t.Fail() + } }) }