From 8777f33c6e3194b2251a62a6936711fdd56354e7 Mon Sep 17 00:00:00 2001 From: Andrey Ivanov Date: Sun, 8 Nov 2020 15:02:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=81=D0=B5=20=D0=BF=D0=BE=D1=87=D0=B8?= =?UTF-8?q?=D0=BD=D0=B8=D0=BB.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 1 + cmd/main.go | 3 ++- cmd/main_test.go | 3 ++- previewer.conf | 2 +- project_test.html | 10 +++++----- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28528be..cb751b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ jobs: script: - make lint - make unit-test + - make integration-test - make build - make docker-build if: (type = push) OR (type = pull_request) diff --git a/cmd/main.go b/cmd/main.go index 99ec26a..6ceff9b 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -5,6 +5,7 @@ import ( "log" "os" "os/signal" + "syscall" "github.com/tiburon-777/OTUS_Project/internal/application" "github.com/tiburon-777/OTUS_Project/internal/config" @@ -27,7 +28,7 @@ func main() { } go func() { signals := make(chan os.Signal, 1) - signal.Notify(signals) + signal.Notify(signals, syscall.SIGINT, syscall.SIGKILL, syscall.SIGTERM) <-signals signal.Stop(signals) diff --git a/cmd/main_test.go b/cmd/main_test.go index 47f4c64..d59f9e7 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -29,8 +29,8 @@ func TestIntegrationPositive(t *testing.T) { main() }(ctx) - //time.Sleep(30*time.Second) // Реализовать тесты логики приложения (ресайзы по разным требованиям): + time.Sleep(3*time.Second) wg.Add(3) t.Run("test static", func(t *testing.T) { defer wg.Done() @@ -75,6 +75,7 @@ func TestIntegrationNegative(t *testing.T) { }(ctx) // Реализовать тесты отказа: + time.Sleep(3*time.Second) wg.Add(5) t.Run("remote server not exist", func(t *testing.T) { defer wg.Done() diff --git a/previewer.conf b/previewer.conf index 6707ae6..7e91690 100644 --- a/previewer.conf +++ b/previewer.conf @@ -10,6 +10,6 @@ StoragePath = "./assets/cache" Timeout = 15 [Log] -File = "previewer.log" +File = "./previewer.log" Level = "INFO" MuteStdout = false \ No newline at end of file diff --git a/project_test.html b/project_test.html index 596c82e..782ad4a 100644 --- a/project_test.html +++ b/project_test.html @@ -3,19 +3,19 @@
- +
- +
- +
- +
- +